scons
scons copied to clipboard
as-live test fails on some assemblers
On a recently updated debian 12 "bookworm" (this is current "testing" version, not "stable"), the live assembler test fails due to warnings being emitted, and not expected by the test. Looks like this:
1/1 (100.00%) /usr/bin/python test/AS/as-live.py
STDOUT =========================================================================
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
as -o aaa.o aaa.s
gcc -o aaa_main.o -c aaa_main.c
gcc -o aaa aaa.o aaa_main.o
/usr/bin/python wrapper.py /usr/bin/as -o bbb.o bbb.s
gcc -o bbb_main.o -c bbb_main.c
gcc -o bbb bbb.o bbb_main.o
gcc -I. -c -o ccc.o ccc.S
gcc -o ccc_main.o -c -I. ccc_main.c
gcc -o ccc ccc.o ccc_main.o
scons: done building targets.
STDERR =========================================================================
0a1,6
> /bin/ld: warning: aaa.o: missing .note.GNU-stack section implies executable stack
> /bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
> /bin/ld: warning: bbb.o: missing .note.GNU-stack section implies executable stack
> /bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
> /bin/ld: warning: ccc.o: missing .note.GNU-stack section implies executable stack
> /bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
FAILED test of /home/mats/github/scons/scripts/scons.py
at line 665 of /home/mats/github/scons/testing/framework/TestCommon.py (_complete)
from line 754 of /home/mats/github/scons/testing/framework/TestCommon.py (run)
from line 464 of /home/mats/github/scons/testing/framework/TestSCons.py (run)
from line 167 of /home/mats/github/scons/test/AS/as-live.py
This assembler identifies itself as:
GNU assembler (GNU Binutils for Debian) 2.38.90.20220713
Copyright (C) 2022 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-linux-gnu'.
This is some decent reading on the topic, though of course it has a Gentoo flavor:
https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart
It seems the section info stuff only works on a .S (uppercase) assembler source file which will be preprocessed, not on a .s (lowercase). The test generates two lcase-s files and one ucase-S file, thus the triple complaint above.