Revision: 5284 http://ipcop.svn.sourceforge.net/ipcop/?rev=5284&view=rev Author: gespinasse Date: 2010-12-28 09:06:17 +0000 (Tue, 28 Dec 2010)
Log Message: ----------- Change how we use the unhardened specs for testing. That way, everyone compile the same gcc and we hack the specs only for testing. We no more need to register to svn the harned specs but you need to recompile the toolchain to run final test Modified Paths: -------------- ipcop/trunk/lfs/gcc Modified: ipcop/trunk/lfs/gcc =================================================================== --- ipcop/trunk/lfs/gcc 2010-12-27 18:14:17 UTC (rev 5283) +++ ipcop/trunk/lfs/gcc 2010-12-28 09:06:17 UTC (rev 5284) @@ -218,6 +218,11 @@ cd $(DIR_SRC) && $(TARGET_TGT)-gcc -B/$(TOOLS_DIR)/lib dummy.c cd $(DIR_SRC) && readelf -l a.out | grep ": /$(TOOLS_DIR)$(LINKER)" cd $(DIR_SRC) && rm dummy.c a.out + + # save the specs + # - for testing final gcc without hardened options + # - much easier to repackage toolchain after adjust-toolchain + $(LFS_TGT)-gcc -dumpspecs > /$(TOOLS_DIR)/etc/gcc-unhardened.specs endif # PASS 2 endif # toolchain @@ -232,9 +237,9 @@ endif # From HLFS, apply these 3 patches if you want to create/verify gcc specs file - #cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/gcc-4.4.5_fortify-source-1.patch - #cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/gcc-4.4.5_fpie-1.patch - #cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/gcc-4.4.5_fstack-protector-1.patch + cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/gcc-4.4.5_fortify-source-1.patch + cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/gcc-4.4.5_fpie-1.patch + cd $(DIR_APP) && patch -Np1 -i $(DIR_PATCHES)/gcc-4.4.5_fstack-protector-1.patch cd $(DIR_SRC)/gcc-build && \ ../$(THISAPP)/configure \ @@ -262,6 +267,13 @@ endif ifeq "$(RUNNING_TEST)" "yes" + # save hardened specs + cp /usr/src/gcc-build/gcc/specs /usr/src/gcc-build/gcc/gcc-hardened.specs + # and replace with unhardened spec for testing as some test does support hardening by default + # ccache-2.4 may not like as specs file is not hashed, only compiler size : TODO upgrade to ccache-3 + sed -e 's@/$(TOOLS_DIR)$(LINKER)@$(LINKER)@g' \ + /$(TOOLS_DIR)/etc/gcc-unhardened.specs \ + > /usr/src/gcc-build/gcc/specs # Do not to stop on error in tests # 6 gcc.c-torture/compile/limits-exprparen.c test fail if ulimit -s = 8192 and disappear with -s = 16384 # abi_check fail for unknow reason on all arch and nobody care (may work on 4.5) @@ -274,21 +286,13 @@ bash -c "ulimit -s 16384; make -j 1 -k check DEJAGNU_TIMEOUT=900 RUNTESTFLAGS=\"--target_board=$(TESTTARGET)\"" \ &> $(DIR_TEST)/$(THISAPP)-$(STAGE_ORDER).log -cd $(DIR_SRC)/gcc-build && ../gcc-$(VER)/contrib/test_summary >> $(DIR_TEST)/$(THISAPP)-summary-$(STAGE_ORDER).log + # now restore hardened specs + mv /usr/src/gcc-build/gcc/gcc-hardened.specs /usr/src/gcc-build/gcc/specs endif cd $(DIR_SRC)/gcc-build && make install ln -sfv ../usr/bin/cpp /lib ln -sfv gcc /usr/bin/cc - - # Use following with the 3 HLFS patches from above to generate specs file for hardening - #gcc -dumpspecs > `dirname $$($(TARGET_TGT)-gcc --print-libgcc-file-name)`/specs-$(MACHINE) - # After inspecting the specs-$(MACHINE) file, copy it to config/gcc/specs-iso-$(MACHINE) - - # Make hardening the default through specs file. - # If we patch as in HLFS, we add many errors in tests. - sed -e 's|GCCVERSION|$(VER)|' \ - $(DIR_SRC)/config/gcc/specs-iso-$(MACHINE) \ - > `dirname $$($(TARGET_TGT)-gcc -print-libgcc-file-name)`/specs endif # base @rm -rf $(DIR_APP) $(DIR_SRC)/gcc-build This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Ipcop-svn mailing list Ipcop-svn@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ipcop-svn