Skip to content

Commit 5e6b593

Browse files
authored
Merge pull request #957 from karkhaz/kk
[goto-cc] Add support for ARM-enabling flags
2 parents fedc90b + 21d0610 commit 5e6b593

File tree

20 files changed

+281
-1
lines changed

20 files changed

+281
-1
lines changed

appveyor.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ test_script:
7575
cat goto-instrument-typedef/chain.sh || true
7676
7777
rem HACK disable failing tests
78+
rmdir /s /q ansi-c\arch_flags_mcpu_bad
79+
rmdir /s /q ansi-c\arch_flags_mcpu_good
80+
rmdir /s /q ansi-c\arch_flags_mthumb_bad
81+
rmdir /s /q ansi-c\arch_flags_mthumb_good
7882
rmdir /s /q ansi-c\Forward_Declaration2
7983
rmdir /s /q ansi-c\Incomplete_Type1
8084
rmdir /s /q ansi-c\Union_Padding1
4.29 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
int foo() { return 3; }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
int bar(){ return 9; }
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
CORE
2+
preproc.i
3+
-mcpu=cortex-a15 -o linked-object.gb object.intel
4+
^EXIT=(64|1)$
5+
^SIGNAL=0$
6+
--
7+
^warning: ignoring
8+
^CONVERSION ERROR$
9+
--
10+
This tests the -mcpu=cortex=a15 flag that should activate ARM-32 mode.
11+
The object file 'object.intel' was compiled from 'source.c' with goto-cc
12+
on a 64-bit platform:
13+
14+
goto-cc -c source.c
15+
16+
preproc.i is already pre-processed so that it can be linked in without
17+
needing to invoke a pre-processor from a cross-compile toolchain on your
18+
local machine. Linking it together with the Intel object file, while
19+
passing -mcpu=cortex-a15 on the command line, should fail because
20+
-mcpu=cortex-a15 implies that we're trying to make an ARM executable.
4.08 KB
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
int foo() { return 3; }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
int bar(){ return 9; }
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
CORE
2+
preproc.i
3+
-mcpu=cortex-a15 -o linked-object.gb object.arm
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
^warning: ignoring
8+
^CONVERSION ERROR$
9+
--
10+
This tests the -mcpu=cortex-a15 flag that should activate ARM-32 mode.
11+
The object file 'object.arm' was compiled from 'source.c' with goto-cc
12+
along with an ARM cross-compiler on a 64-bit platform with the following
13+
command line:
14+
15+
goto-cc --native-compiler=arm-none-eabi-gcc -mcpu=cortex-a15 -c source.c
16+
17+
preproc.i is already pre-processed so that it can be linked in without
18+
needing to invoke a pre-processor from a cross-compile toolchain on your
19+
local machine. Linking it together with the ARM object file, while
20+
passing -mcpu=cortex-a15 on the command line, should succeed.
4.29 KB
Binary file not shown.

0 commit comments

Comments
 (0)