Skip to content

Instantly share code, notes, and snippets.

@thehajime
Created November 14, 2013 05:31
Show Gist options
  • Save thehajime/7461914 to your computer and use it in GitHub Desktop.
Save thehajime/7461914 to your computer and use it in GitHub Desktop.
# HG changeset patch
# Parent 092b770473a785abc4b9232a5e2c76c8ce497485
diff -r 092b770473a7 bake/ModuleBuild.py
--- a/bake/ModuleBuild.py Wed Sep 25 23:58:18 2013 +0900
+++ b/bake/ModuleBuild.py Thu Oct 10 09:13:32 2013 +0900
@@ -31,6 +31,7 @@
import commands
import re
import sys
+import shlex
from bake.Utils import ModuleAttributeBase
from bake.Exceptions import NotImplemented
from bake.Exceptions import TaskError
@@ -756,7 +757,8 @@
if not "--prefix" in command:
command = command + ' --prefix=' + env.objdir
- command= bake.Utils.split_args(command)
+ #command= bake.Utils.split_args(command)
+ command = shlex.split(command)
env.run(command, directory=env.objdir)
diff -r 092b770473a7 bakeconf.xml
--- a/bakeconf.xml Wed Sep 25 23:58:18 2013 +0900
+++ b/bakeconf.xml Thu Oct 10 09:13:32 2013 +0900
@@ -122,7 +122,7 @@
<attribute name="LDFLAGS" value="-pie"/>
<attribute name="ignore_predefined_flags" value="True"/>
<attribute name="install_arguments" value="DESTDIR=$INSTALLDIR" />
- <attribute name="build_arguments" value="CCOPTS+=-fpic CCOPTS+=-D_GNU_SOURCE CCOPTS+=-O0 CCOPTS+=-U_FORTIFY_SOURCE LDFLAGS=-pie DEFINES+=-I$SRCDIR/../mptcp/arch/sim/include/ DEFINES+=-I$SRCDIR/../mptcp/include/uapi/ DEFINES+=-I$SRCDIR/../mptcp/include"/>
+ <attribute name="build_arguments" value="CCOPTS+=-fpic CCOPTS+=-D_GNU_SOURCE CCOPTS+=-O0 CCOPTS+=-U_FORTIFY_SOURCE LDFLAGS=-pie LDFLAGS+=-rdynamic DEFINES+=-I$SRCDIR/../mptcp/arch/sim/include/ DEFINES+=-I$SRCDIR/../mptcp/include/uapi/ DEFINES+=-I$SRCDIR/../mptcp/include"/>
</build>
</module>
@@ -174,7 +174,7 @@
<depends_on name="libexpat-dev" optional="False"/>
<build type="make" objdir="yes">
<attribute name="pre_installation" value="cd $SRCDIR;INSTALL_BASE=$INSTALLDIR ./configure;mkdir $INSTALLDIR/include;mkdir $INSTALLDIR/lib;mkdir $INSTALLDIR/bin"/>
- <attribute name="build_arguments" value="MORE_LDLIBS=-pie"/>
+ <attribute name="build_arguments" value="MORE_LDLIBS=-pie COPT+=-rdynamic"/>
<attribute name="new_variable" value="INSTALL_BASE=$INSTALLDIR" />
</build>
</module>
@@ -187,6 +187,7 @@
<build type="make" objdir="yes">
<attribute name="pre_installation" value="cd $SRCDIR;./configure --prefix=$INSTALLDIR"/>
<attribute name="patch" value="$SRCDIR/../ns-3-dce/utils/iperf_4_dce.patch"/>
+ <attribute name="build_arguments" value="LDFLAGS=-pie LDFLAGS+=-rdynamic"/>
</build>
</module>
@@ -264,7 +265,7 @@
<attribute name="LDFLAGS" value="-pie"/>
<attribute name="ignore_predefined_flags" value="True"/>
<attribute name="install_arguments" value="DESTDIR=$INSTALLDIR" />
- <attribute name="build_arguments" value="CCOPTS+=-fpic CCOPTS+=-D_GNU_SOURCE CCOPTS+=-O0 CCOPTS+=-U_FORTIFY_SOURCE LDFLAGS=-pie"/>
+ <attribute name="build_arguments" value="CCOPTS+=-fpic CCOPTS+=-D_GNU_SOURCE CCOPTS+=-O0 CCOPTS+=-U_FORTIFY_SOURCE LDFLAGS=-pie LDFLAGS+=-rdynamic"/>
</build>
</module>
@@ -329,7 +330,7 @@
<attribute name="extract_directory" value="wget-1.14"/>
</source>
<build type="make" objdir="yes">
- <attribute name="pre_installation" value="cd $SRCDIR; CFLAGS=-fPIC LDFLAGS=-pie ./configure --disable-opie --disable-digest --disable-ntlm --disable-largefile --disable-threads --disable-nls --disable-rpath --disable-iri --without-ssl --without-zlib --without-libiconv-prefix --without-libintl-prefix --without-libpth-prefix --without-included-regex --prefix=$INSTALLDIR"/>
+ <attribute name="pre_installation" value="cd $SRCDIR; CFLAGS='-fPIC -g' LDFLAGS='-pie -rdynamic' ./configure --disable-opie --disable-digest --disable-ntlm --disable-largefile --disable-threads --disable-nls --disable-rpath --disable-iri --without-ssl --without-zlib --without-libiconv-prefix --without-libintl-prefix --without-libpth-prefix --without-included-regex --prefix=$INSTALLDIR"/>
</build>
</module>
@@ -367,7 +368,7 @@
if not jobs == -1:
jobstr = ['-j', str(jobs)]
env.run(['make', 'CFLAGS=-fpic', 'CFLAGS+=-D_GNU_SOURCE', 'CFLAGS+=-g',
- 'CFLAGS+=-Wstrict-prototypes', 'CFLAGS+=-Wall', 'LDFLAGS=-pie',
+ 'CFLAGS+=-Wstrict-prototypes', 'CFLAGS+=-Wall', 'LDFLAGS=-pie', 'LDFLAGS+=-rdynamic',
'ping', 'ping6'] + jobstr,
directory=env.srcdir)
env.run(['mkdir', '-p' , env.installdir + '/bin_dce/'],
@@ -404,7 +405,7 @@
<build type="autotools" objdir="no">
<attribute name="supported_os" value="linux;linux2"/>
<attribute name="maintainer" value="yes" />
- <attribute name="configure_arguments" value="./configure CFLAGS=-fPIC LDFLAGS=-pie --prefix=$INSTALLDIR --enable-vt --with-builtin-crypto"/>
+ <attribute name="configure_arguments" value="./configure CFLAGS=-fPIC LDFLAGS='-pie -rdynamic' --prefix=$INSTALLDIR --enable-vt --with-builtin-crypto"/>
<attribute name="install_arguments" value="-n" />
<attribute name="post_installation" value="cd $SRCDIR; mkdir $INSTALLDIR/bin_dce; /bin/cp -f src/mip6d $INSTALLDIR/bin_dce"/>
</build>
@@ -459,7 +460,7 @@
<depends_on name="indent" optional="False"/>
<depends_on name="gawk" optional="False"/>
<build type="make" objdir="yes">
- <attribute name="pre_installation" value="cd $SRCDIR; CFLAGS='-fPIC -g' LDFLAGS=-pie ./configure --disable-shared --enable-static --disable-user --disable-group --disable-capabilities --prefix=$INSTALLDIR"/>
+ <attribute name="pre_installation" value="cd $SRCDIR; CFLAGS='-fPIC -g' LDFLAGS='-pie -rdynamic' ./configure --disable-shared --enable-static --disable-user --disable-group --disable-capabilities --prefix=$INSTALLDIR"/>
<attribute name="install_arguments" value="-n" />
<attribute name="post_installation" value="cd $SRCDIR; mkdir $INSTALLDIR/bin_dce; /bin/cp zebra/zebra $INSTALLDIR/bin_dce;/bin/cp ripd/ripd $INSTALLDIR/bin_dce;/bin/cp ripngd/ripngd $INSTALLDIR/bin_dce;/bin/cp ospfd/ospfd $INSTALLDIR/bin_dce;/bin/cp ospf6d/ospf6d $INSTALLDIR/bin_dce;/bin/cp bgpd/bgpd $INSTALLDIR/bin_dce"/>
</build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment