On Wed, Apr 01, 2020 at 10:29:15AM -0700, Fangrui Song wrote:
The previous commit changed romlayout32flag.lds to use `. += ` instead of `. =`. We no longer need the LD capability test checking https://sourceware.org/bugzilla/show_bug.cgi?id=12726
Thanks. It would be great to remove this test. Were you able to bring up that old version of Ubuntu and verify that it produces bootable code (or definitely errors) with the new code though? I'd like to make sure the new code doesn't result in silently broken code.
-Kevin
Signed-off-by: Fangrui Song maskray@google.com
scripts/test-build.sh | 42 +----------------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-)
diff --git a/scripts/test-build.sh b/scripts/test-build.sh index 25cc2f2..8b35d6f 100755 --- a/scripts/test-build.sh +++ b/scripts/test-build.sh @@ -4,50 +4,10 @@ mkdir -p ${OUT} TMPFILE1=${OUT}/tmp_testcompile1.c TMPFILE1o=${OUT}/tmp_testcompile1.o -TMPFILE1_ld=${OUT}/tmp_testcompile1.lds TMPFILE2=${OUT}/tmp_testcompile2.c TMPFILE2o=${OUT}/tmp_testcompile2.o TMPFILE3o=${OUT}/tmp_testcompile3.o
-# Test if ld's alignment handling is correct. This is a known problem -# with the linker that ships with Ubuntu 11.04. -cat - > $TMPFILE1 <<EOF -const char v1[] __attribute__((section(".text.v1"))) = "0123456789"; -const char v2[] __attribute__((section(".text.v2"))) = "0123456789"; -EOF -cat - > $TMPFILE1_ld <<EOF -SECTIONS -{
.mysection 0x88f0 : {
-. = 0x10 ; -*(.text.v1) -. = 0x20 ; -*(.text.v2) -. = 0x30 ;
}
-} -EOF -$CC -O -g -c $TMPFILE1 -o $TMPFILE1o > /dev/null 2>&1 -if [ $? -ne 0 ]; then
- echo "Unable to execute the C compiler ($CC)." >&2
- echo "" >&2
- echo "Please install a working compiler and retry." >&2
- echo -1
- exit 0
-fi -$LD -T $TMPFILE1_ld $TMPFILE1o -o $TMPFILE2o > /dev/null 2>&1 -if [ $? -ne 0 ]; then
- echo "The version of LD on this system ($LD) does not properly handle" >&2
- echo "alignments. As a result, this project can not be built." >&2
- echo "" >&2
- echo "The problem may be the result of this LD bug report:" >&2
- echo " http://sourceware.org/bugzilla/show_bug.cgi?id=12726" >&2
- echo "" >&2
- echo "Please update to a working version of binutils and retry." >&2
- echo -1
- exit 0
-fi
# Test for "-fwhole-program". Older versions of gcc (pre v4.1) don't # support the whole-program optimization - detect that. $CC -fwhole-program -S -o /dev/null -xc /dev/null > /dev/null 2>&1 @@ -87,4 +47,4 @@ echo 0 # "ebp" register is clobberred in an "asm" statement. The code has # been modified to not clobber "ebp" - no test is available yet.
-rm -f $TMPFILE1 $TMPFILE1o $TMPFILE1_ld $TMPFILE2 $TMPFILE2o $TMPFILE3o
+rm -f $TMPFILE1 $TMPFILE1o $TMPFILE2 $TMPFILE2o $TMPFILE3o
2.26.0.rc2.310.g2932bb562d-goog _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org