Skip to content

Commit 3db352e

Browse files
authored
Merge pull request #7373 from tautschnig/feature/rebuild
ansi-c tests: add Makefile rule to rebuild goto binaries
2 parents b1d99cb + 28b76fa commit 3db352e

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed

regression/ansi-c/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,15 @@ ifneq ($(BUILD_ENV_),MSVC)
5252
@../test.pl -e -p -c "$(exe) -xc++ -D_Bool=bool" -I test-c++-front-end -s c++-front-end $(excluded_tests)
5353
endif
5454

55+
build_goto_binaries:
56+
uname -m | grep x86_64
57+
cd arch_flags_mcpu_bad ; $(exe) -c source.c -o object.intel
58+
cd arch_flags_mcpu_good ; \
59+
$(exe) -o object.arm --native-compiler=arm-none-eabi-gcc -mcpu=cortex-a15 -c source.c
60+
cd arch_flags_mthumb_bad ; $(exe) -c source.c -o object.intel
61+
cd arch_flags_mthumb_good ; \
62+
$(exe) -o object.arm --native-compiler=arm-none-eabi-gcc -mthumb -c source.c
63+
5564
clean:
5665
find . -name '*.out' -execdir $(RM) '{}' \;
5766
find . -name '*.gb' -execdir $(RM) '{}' \;

regression/ansi-c/arch_flags_mcpu_bad/test.desc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on a 64-bit platform:
1313

1414
goto-cc -c source.c -o object.intel
1515

16+
Use `make build_goto_binaries` in the parent directory to run the above for this
17+
and all other directories containing binaries.
18+
1619
preproc.i is already pre-processed so that it can be linked in without
1720
needing to invoke a pre-processor from a cross-compile toolchain on your
1821
local machine. Linking it together with the Intel object file, while

regression/ansi-c/arch_flags_mcpu_good/test.desc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ using:
2323

2424
which will install arm-none-eabi-gcc (amongst other things).
2525

26+
Use `make build_goto_binaries` in the parent directory to run the above for this
27+
and all other directories containing binaries.
28+
2629
preproc.i is already pre-processed so that it can be linked in without
2730
needing to invoke a pre-processor from a cross-compile toolchain on your
2831
local machine. Linking it together with the ARM object file, while

regression/ansi-c/arch_flags_mthumb_bad/test.desc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ file 'object.intel' was compiled from 'source.c' with goto-cc on a
1313

1414
goto-cc -c source.c -o object.intel
1515

16+
Use `make build_goto_binaries` in the parent directory to run the above for this
17+
and all other directories containing binaries.
18+
1619
preproc.i is already pre-processed so that it can be linked in without
1720
needing to invoke a pre-processor from a cross-compile toolchain on your
1821
local machine. Linking it together with the Intel object file, while

regression/ansi-c/arch_flags_mthumb_good/test.desc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ using:
2323

2424
which will install arm-none-eabi-gcc (amongst other things).
2525

26+
Use `make build_goto_binaries` in the parent directory to run the above for this
27+
and all other directories containing binaries.
28+
2629
preproc.i is already pre-processed so that it can be linked in without
2730
needing to invoke a pre-processor from a cross-compile toolchain on your
2831
local machine. Linking it together with the ARM object file, while

0 commit comments

Comments
 (0)