Update of /cvsroot/devil-linux/build/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12913/scripts Modified Files: bind binutils build.sh fam gcc glibc gnupg grub sg3_utils util-linux vsftpd watchdog Log Message: more changes to get -pie and ssp working Index: gcc =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/gcc,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- gcc 12 Dec 2004 21:48:08 -0000 1.27 +++ gcc 28 Dec 2004 18:55:08 -0000 1.28 @@ -9,7 +9,7 @@ ### BEGIN INIT INFO # Provides: gcc -# Required-Start: distcc prepare binutils +# Required-Start: distcc prepare glibc binutils # Required-Stop: # Default-Start: 1 2 # Default-Stop: @@ -27,70 +27,54 @@ case $1 in build ) + CONFIG_EXTRA="" if [ "$CONFIG_GCC_STACK_PROTECTOR" = "y" ]; then + PROTECTORDIR=$(find_src_dir protector) if [ ! -e ./.done_patch_protector ]; then cd gcc - patch -p1 -i $WORKDIR/protector.dif || exit 1 - cp $WORKDIR/protector.c $WORKDIR/protector.h . || exit 1 - patch -p1 -i $WORKDIR/protectonly.dif || exit 1 + patch -p1 -i $PROTECTORDIR/gcc*.dif || exit 1 + cp $PROTECTORDIR/gcc/protector.c $PROTECTORDIR/gcc/protector.h . || exit 1 + #patch -p1 -i $PROTECTORDIR/protectonly.dif || exit 1 cd .. touch ./.done_patch_protector - if [ ! -f devil-linux-kernel-protector-patch.done ]; then - touch devil-linux-kernel-protector-patch.done + if [ ! -f $KERNELDIR/devil-linux-kernel-protector-patch.done ]; then if [ "$CONFIG_LINUX_VERSION" = "2.4" ]; then bzcat $DL_DIR/src/linux-2.4.*-protector-1.patch.bz2 | patch -p1 -d $KERNELDIR || exit 1 else bzcat $DL_DIR/src/linux-2.6.*-protector-1.patch.bz2 | patch -p1 -d $KERNELDIR || exit 1 fi + touch $KERNELDIR/devil-linux-kernel-protector-patch.done fi fi - fi - - if [ "$CONFIG_GCC_PIE" = "y" ]; then - if [ ! -e ./.done_patch_pie ]; then - bzcat $DL_DIR/src/gcc-3.3.2-pie-1.diff.bz2 | patch -p1 || exit 1 - touch ./.done_patch_pie - fi + CONFIG_EXTRA="$CONFIG_EXTRA --enable-stack-protector" + #patch -p1 -i $(find_src_dir gcc-secpatches)/gcc-3.4-sspspecs-3.patch || exit 1 fi if [ ! -f gcc-patches.done ]; then bzcat $DL_DIR/src/gcc-3*patch.bz2 | patch -p1 || exit 1 touch gcc-patches.done + patch -p1 -i $(find_src_dir gcc-secpatches)/gcc-3.4-piespecs_x86-2.patch || exit 1 fi + sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in + replace_str gcc/Makefile.in "CFLAGS = -g" "CFLAGS = -g -D_LIBC_PROVIDES_SSP_" + replace_str gcc/Makefile.in "BOOT_CFLAGS = -g -O2" "CFLAGS=-g -O2 -D_LIBC_PROVIDES_SSP_" + rm -rf ../gcc-build mkdir ../gcc-build || exit 1 cd ../gcc-build || exit 1 + ../gcc-3*/configure --prefix=/usr --localstatedir=/var --enable-shared --enable-CONFIG_SHELL=/bin/bash \ - --enable-threads=posix --with-slibdir=/lib --enable-__cxa_atexit --enable-clocale=gnu \ - --enable-languages=c,c++,objc --disable-nls $CONF_HOST || exit 1 + --enable-threads=posix --libexecdir=/usr/lib --enable-__cxa_atexit --enable-clocale=gnu \ + --enable-languages=c,c++,objc --disable-nls --with-gnu-ld $CONFIG_EXTRA $CONF_HOST || exit 1 make MAKE="make $PMAKE" $PMAKE bootstrap || exit 1 strip_debug # install it, so we use the same version everywhere make install-no-fixedincludes || exit 1 - if [ "$CONFIG_GCC_ET_DYN" = "y" ]; then - pushd $(find_src_dir et_dyn) > /dev/null - cd linux || exit 1 - GLIBC=$(find_src_dir glibc) - GLIBC=${GLIBC##*/} - cp $GLIBC/*.S . || exit 1 - make || exit 1 - GCCSPECDIR=$(dirname $(gcc --print-libgcc-file-name)) - cp crt1S.o $GCCSPECDIR || exit 1 - ln -sf crt1S.o $GCCSPECDIR/Scrt1.o || exit 1 - popd > /dev/null - GCCVER=${GCCSPECDIR##*/} - test ! -f $GCCSPECDIR/specs.orig && cp $GCCSPECDIR/specs $GCCSPECDIR/specs.orig - echo $GCCSPECDIR/ - bzcat $DL_DIR/src/gcc-$GCCVER-et_dyn-specs.bz2 > $GCCSPECDIR/specs.et_dyn || exit 1 - ln -sf specs.orig $GCCSPECDIR/specs || exit 1 - ln -sf specs.et_dyn $GCCSPECDIR/specs || exit 1 - fi - ;; install ) Index: util-linux =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/util-linux,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- util-linux 24 Dec 2004 17:03:50 -0000 1.30 +++ util-linux 28 Dec 2004 18:55:09 -0000 1.31 @@ -25,11 +25,11 @@ case $1 in build ) - disable_et_dyn if [ ! -f util-linux-patch.done ]; then echo "patch 2.4 " patch -p1 -i $(find_src_dir loop-AES)/util-linux-2.12*.diff || exit 1 touch util-linux-patch.done + bzcat $DL_DIR/src/util-linux*.patch.bz2 | patch -p1 || exit 1 fi # (from LFS) GCC-3.4.1 miscompiles sfdisk if the default optimisation level is used. The following command prevents the problematic optimisation pass from being used. @@ -37,11 +37,7 @@ ./configure || exit 1 replace_str defines.h "#define ENABLE_NLS" "" - if [ "$CONFIG_GCC_ET_DYN" = "y" ]; then - make $PMAKE HAVE_SLN=yes HAVE_KILL=yes ADD_RAW=yes DISABLE_NLS=yes LDFLAGS="-pie" || exit 1 - else - make $PMAKE HAVE_SLN=yes HAVE_KILL=yes ADD_RAW=yes DISABLE_NLS=yes || exit 1 - fi + make $PMAKE HAVE_SLN=yes HAVE_KILL=yes ADD_RAW=yes DISABLE_NLS=yes LDFLAGS="-pie" || exit 1 strip_debug # we need some of the tools later, so let's install it Index: grub =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/grub,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- grub 12 Dec 2004 21:48:08 -0000 1.9 +++ grub 28 Dec 2004 18:55:09 -0000 1.10 @@ -31,16 +31,16 @@ touch grub-patches.done fi if [ "$CONFIG_GCC_STACK_PROTECTOR" = "y" ]; then - CFLAGS="-Os -fno-stack-protector" + CFLAGS="-Os -fno-stack-protector -no-pie -static" else - CFLAGS="-Os" + CFLAGS="-Os -no-pie -static" fi export CFLAGS #autoreconf --install --force aclocal automake autoconf - ./configure --prefix=/usr --sbindir=/sbin --disable-auto-linux-mem-opt + ./configure --prefix=/usr --sbindir=/sbin --disable-auto-linux-mem-opt --disable-nls || exit 1 make $PMAKE || exit 1 pushd grub > /dev/null || exit 1 @@ -69,3 +69,4 @@ exit 1 ;; esac + Index: bind =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/bind,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- bind 12 Dec 2004 21:48:08 -0000 1.32 +++ bind 28 Dec 2004 18:55:08 -0000 1.33 @@ -28,7 +28,11 @@ case $1 in build ) if [ "$CONFIG_ISC_BIND" = "y" ]; then - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-openssl=/usr/ssl --enable-threads --with-libtool || exit 1 + # don't compile the tests, they'll fail with the forced -pie + replace_str bin/Makefile.in "tests" "" + + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-openssl=/usr/ssl \ + --with-pic --enable-threads --with-libtool || exit 1 make depend || exit 1 #make $PMAKE all || exit 1 make all || exit 1 Index: sg3_utils =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/sg3_utils,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- sg3_utils 12 Dec 2004 21:48:09 -0000 1.10 +++ sg3_utils 28 Dec 2004 18:55:09 -0000 1.11 @@ -27,7 +27,7 @@ case $1 in build ) if [ "$CONFIG_SG3_UTILS" = "y" ]; then - disable_et_dyn + replace_str Makefile "CFLAGS = " "CFLAGS = -no-pie " make $PMAKE all || exit 1 strip_debug fi Index: vsftpd =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/vsftpd,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- vsftpd 12 Dec 2004 21:48:09 -0000 1.13 +++ vsftpd 28 Dec 2004 18:55:09 -0000 1.14 @@ -28,13 +28,8 @@ case $1 in build ) if [ "$CONFIG_VSFTPD" = "y" ]; then - disable_et_dyn replace_str builddefs.h "#undef VSF_BUILD_SSL" "#define VSF_BUILD_SSL" - if [ "$CONFIG_GCC_ET_DYN" = "y" ]; then - make $PMAKE LINK="-Wl,-s,-pie" || exit 1 - else - make $PMAKE LINK="-Wl,-s" || exit 1 - fi + make $PMAKE CFLAGS="-O2 -Wall -Wshadow -W -no-pie" LINK="-Wl,-s,-pie" || exit 1 strip_debug fi ;; Index: gnupg =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/gnupg,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- gnupg 12 Dec 2004 21:48:08 -0000 1.14 +++ gnupg 28 Dec 2004 18:55:08 -0000 1.15 @@ -31,8 +31,8 @@ ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc --disable-nls --enable-sha512 \ --without-libiconv-prefix --without-libintl-prefix --with-bzip2 --with-zlib \ --disable-dynload --disable-exec --disable-photo-viewers --disable-keyserver-helpers --disable-ldap \ - --disable-rpath LDFLAGS=-static || exit 1 - make $PMAKE all || exit 1 + --disable-rpath LDFLAGS=-static || exit 1 + make $PMAKE all || exit 1 strip_debug cp g10/gpgv gpgv-static || exit 1 Index: fam =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/fam,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- fam 11 Jan 2004 14:43:04 -0000 1.4 +++ fam 28 Dec 2004 18:55:08 -0000 1.5 @@ -25,12 +25,15 @@ case $1 in build ) - ./configure --prefix=/usr --disable-nls || exit 1 - make $PMAKE all || exit 1 - strip_debug + if [ "$CONFIG_WVDIAL" = "y" ]; then - # we have to install this immediately, because this is a library and could be needed by other sources - make install || exit 1 + ./configure --prefix=/usr --disable-nls || exit 1 + make $PMAKE all || exit 1 + strip_debug + + # we have to install this immediately, because this is a library and could be needed by other sources + make install || exit 1 + fi ;; * ) Index: watchdog =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/watchdog,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- watchdog 12 Dec 2004 21:48:09 -0000 1.17 +++ watchdog 28 Dec 2004 18:55:09 -0000 1.18 @@ -34,7 +34,7 @@ fi add_kernel_options $MYDIR/config/config_watchdog ./configure --prefix=/usr --localstatedir=/var --disable-nfs --with-linelength=256|| exit 1 - make $PMAKE all || exit 1 + make LDFLAGS="" CFLAGS="-g -O2 -no-pie" $PMAKE all || exit 1 strip_debug fi ;; Index: build.sh =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/build.sh,v retrieving revision 1.90 retrieving revision 1.91 diff -u -d -r1.90 -r1.91 --- build.sh 24 Dec 2004 17:03:50 -0000 1.90 +++ build.sh 28 Dec 2004 18:55:08 -0000 1.91 @@ -131,8 +131,7 @@ echo " mkdir -p $WORKDIR/LOGS/$CMD" >> $WORKDIR/Makefile.$CMD LOG="&> $WORKDIR/LOGS/$CMD/$SCRIPT" fi - #echo " ( test -f $DONEFILE || ( source $MYDIR/settings ; reset_kernel_includes ; enable_et_dyn ; cd $SOURCEDIR ; ( $NICE $MYDIR/$SCRIPT $CMD $LOG ) ) )" >> $WORKDIR/Makefile.$CMD - echo " ( source $MYDIR/settings ; reset_kernel_includes ; enable_et_dyn ; cd $SOURCEDIR ; ( $NICE $MYDIR/$SCRIPT $CMD $LOG ) )" >> $WORKDIR/Makefile.$CMD + echo " ( source $MYDIR/settings ; cd $SOURCEDIR ; ( $NICE $MYDIR/$SCRIPT $CMD $LOG ) )" >> $WORKDIR/Makefile.$CMD echo " touch $DONEFILE" >> $WORKDIR/Makefile.$CMD echo >> $WORKDIR/Makefile.$CMD Index: glibc =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/glibc,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- glibc 24 Dec 2004 23:58:30 -0000 1.43 +++ glibc 28 Dec 2004 18:55:08 -0000 1.44 @@ -10,7 +10,7 @@ ### BEGIN INIT INFO # Provides: glibc -# Required-Start: $basebuildtools perl_stage1 glibc_stage1 +# Required-Start: prepare distcc # Required-Stop: # Default-Start: 1 2 # Default-Stop: Index: binutils =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/binutils,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- binutils 13 Dec 2004 16:41:11 -0000 1.12 +++ binutils 28 Dec 2004 18:55:08 -0000 1.13 @@ -9,7 +9,7 @@ ### BEGIN INIT INFO # Provides: binutils -# Required-Start: prepare distcc glibc_stage1 +# Required-Start: prepare distcc # Required-Stop: # Default-Start: 1 2 # Default-Stop: |