From 1cb16865ed1cc6889b121c3ec7320543cb3760f2 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Tue, 10 Apr 2012 22:44:39 +0200 Subject: [PATCH] Fix preprocessor handling of .s and .S/.sx file extensions. .s doesn't have to be preprocessed, but .S and .sx must be preprocessed. --- bin/blhc | 4 ++-- t/logs/good | 4 ++-- t/tests.t | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/blhc b/bin/blhc index 835e9e0..91b6f35 100755 --- a/bin/blhc +++ b/bin/blhc @@ -62,7 +62,7 @@ my @source_preprocess_compile = ( ); my @source_preprocess_no_compile = ( # Assembly - qw( s ), + qw( S sx ), ); my @source_preprocess = ( @source_preprocess_compile, @@ -87,7 +87,7 @@ my @source_no_preprocess_compile = ( ); my @source_no_preprocess_no_compile = ( # Assembly - qw( S sx ), + qw( s ), ); my @source_no_preprocess = ( @source_no_preprocess_compile, diff --git a/t/logs/good b/t/logs/good index e863207..02f3b67 100644 --- a/t/logs/good +++ b/t/logs/good @@ -21,8 +21,8 @@ g++ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-securi g++ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -pthread -Wl,-z,relro ../src/test/objs/test.o -o ../src/test/bin/test -gcc -c -o test test.S -gcc -D_FORTIFY_SOURCE=2 -c -o test test.s +gcc -D_FORTIFY_SOURCE=2 -c -o test.o test.S +gcc -c -o test.o test.s gcc -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -c -D_FORTIFY_SOURCE=2 ../../../../src/test/test.c -o test.so.o diff --git a/t/tests.t b/t/tests.t index 95a8f40..c9a8649 100644 --- a/t/tests.t +++ b/t/tests.t @@ -109,7 +109,7 @@ CPPFLAGS missing (-D_FORTIFY_SOURCE=2): g++ -g -O2 -fstack-protector --param=ss LDFLAGS missing (-Wl,-z,relro): g++ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -pthread -o ./testProgram ../src/test/testProgram.cpp LDFLAGS missing (-Wl,-z,relro): gcc -o test test-a.o test-b.o test-c.a LDFLAGS missing (-Wl,-z,relro): g++ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security ../src/test/objs/test.o -o ../src/test/bin/test -CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c -o test test.s +CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c -o test test.S CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -E test.c CFLAGS missing (-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): gcc test.c CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test.c @@ -146,7 +146,7 @@ LDFLAGS missing (-fPIE -pie -Wl,-z,relro): g++ -g -O2 -fstack-protector --param LDFLAGS missing (-fPIE -pie): g++ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -pthread -Wl,-z,relro -o ../src/test/bin/test ../src/test/objs/test.o LDFLAGS missing (-fPIE -pie -Wl,-z,relro): gcc -o test test-a.o test-b.o test-c.a LDFLAGS missing (-fPIE -pie -Wl,-z,relro): g++ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security ../src/test/objs/test.o -o ../src/test/bin/test -CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c -o test test.s +CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c -o test test.S CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -E test.c CFLAGS missing (-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): gcc test.c CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test.c @@ -183,7 +183,7 @@ LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): g++ -g -O2 -fstack-protector --param LDFLAGS missing (-Wl,-z,now): g++ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -pthread -Wl,-z,relro -o ../src/test/bin/test ../src/test/objs/test.o LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): gcc -o test test-a.o test-b.o test-c.a LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): g++ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security ../src/test/objs/test.o -o ../src/test/bin/test -CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c -o test test.s +CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c -o test test.S CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -E test.c CFLAGS missing (-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): gcc test.c CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test.c @@ -221,7 +221,7 @@ LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): g++ -g -O2 -fstack-protec LDFLAGS missing (-fPIE -pie -Wl,-z,now): g++ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -pthread -Wl,-z,relro -o ../src/test/bin/test ../src/test/objs/test.o LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): gcc -o test test-a.o test-b.o test-c.a LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): g++ -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security ../src/test/objs/test.o -o ../src/test/bin/test -CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c -o test test.s +CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c -o test test.S CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -E test.c CFLAGS missing (-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): gcc test.c CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc test.c -- 2.43.2