]> ruderich.org/simon Gitweb - blhc/blhc.git/commitdiff
Fix preprocessor handling of .s and .S/.sx file extensions.
authorSimon Ruderich <simon@ruderich.org>
Tue, 10 Apr 2012 20:44:39 +0000 (22:44 +0200)
committerSimon Ruderich <simon@ruderich.org>
Tue, 10 Apr 2012 20:44:39 +0000 (22:44 +0200)
.s doesn't have to be preprocessed, but .S and .sx must be preprocessed.

bin/blhc
t/logs/good
t/tests.t

index 835e9e04e344cea2d96ffe44f5a4fc032343eb83..91b6f3506ab2207c109da724a0149ebe216ee2e8 100755 (executable)
--- a/bin/blhc
+++ b/bin/blhc
@@ -62,7 +62,7 @@ my @source_preprocess_compile = (
 );
 my @source_preprocess_no_compile = (
     # Assembly
 );
 my @source_preprocess_no_compile = (
     # Assembly
-    qw( s ),
+    qw( S sx ),
 );
 my @source_preprocess = (
     @source_preprocess_compile,
 );
 my @source_preprocess = (
     @source_preprocess_compile,
@@ -87,7 +87,7 @@ my @source_no_preprocess_compile = (
 );
 my @source_no_preprocess_no_compile = (
     # Assembly
 );
 my @source_no_preprocess_no_compile = (
     # Assembly
-    qw( S sx ),
+    qw( s ),
 );
 my @source_no_preprocess = (
     @source_no_preprocess_compile,
 );
 my @source_no_preprocess = (
     @source_no_preprocess_compile,
index e863207e421282b44d68124ecd64a4fe04ca5974..02f3b67e8a3cfa6b511ece02f3507987db0a6cf2 100644 (file)
@@ -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
 
 
 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
 
 
 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
 
index 95a8f40c830c43588b7686aab209851a4b35fac0..c9a8649a1658b4fd7d8368466006f808abc5cc95 100644 (file)
--- 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
 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
 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
 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
 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
 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
 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
 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
 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