File tree 16 files changed +60
-30
lines changed
linker_script_symbol-only 16 files changed +60
-30
lines changed Original file line number Diff line number Diff line change @@ -12,15 +12,14 @@ endif
12
12
ifeq ($(BUILD_ENV_ ) ,MSVC)
13
13
excluded_tests = -X gcc-only
14
14
else
15
+ ifeq ($(BUILD_ENV_ ) ,OSX)
15
16
# In MacOS, a change in the assert.h header file
16
17
# is causing template errors when exercising the
17
18
# C++ front end (because of a transitive include
18
19
# of <type_traits>) for files that include the
19
20
# <assert.h> or <cassert> headers.
20
- OS := $(shell uname)
21
- ifeq ($(OS),Darwin)
22
- excluded_tests = -X macos-assert-broken
23
- endif
21
+ excluded_tests = -X macos-assert-broken
22
+ endif
24
23
endif
25
24
26
25
test :
Original file line number Diff line number Diff line change @@ -6,15 +6,14 @@ include ../../src/common
6
6
ifeq ($(BUILD_ENV_ ) ,MSVC)
7
7
excluded_tests = -X gcc-only -X winbug
8
8
else
9
+ ifeq ($(BUILD_ENV_ ) ,OSX)
9
10
# In MacOS, a change in the assert.h header file
10
11
# is causing template errors when exercising the
11
12
# C++ front end (because of a transitive include
12
13
# of <type_traits>) for files that include the
13
14
# <assert.h> or <cassert> headers.
14
- OS := $(shell uname)
15
- ifeq ($(OS),Darwin)
16
- excluded_tests = -X macos-assert-broken
17
- endif
15
+ excluded_tests = -X macos-assert-broken
16
+ endif
18
17
endif
19
18
20
19
test :
Original file line number Diff line number Diff line change @@ -12,15 +12,14 @@ endif
12
12
ifeq ($(BUILD_ENV_ ) ,MSVC)
13
13
excluded_tests = -X gcc-only -X winbug
14
14
else
15
+ ifeq ($(BUILD_ENV_ ) ,OSX)
15
16
# In MacOS, a change in the assert.h header file
16
17
# is causing template errors when exercising the
17
18
# C++ front end (because of a transitive include
18
19
# of <type_traits>) for files that include the
19
20
# <assert.h> or <cassert> headers.
20
- OS := $(shell uname)
21
- ifeq ($(OS),Darwin)
22
- excluded_tests = -X macos-assert-broken
23
- endif
21
+ excluded_tests = -X macos-assert-broken
22
+ endif
24
23
endif
25
24
26
25
test :
Original file line number Diff line number Diff line change
1
+ if ("${CMAKE_SYSTEM_NAME} " STREQUAL "Darwin" )
2
+ set (not_gnu_ld -X gnu-ld-only)
3
+ else ()
4
+ set (not_gnu_ld "" )
5
+ endif ()
6
+
1
7
# TARGET_FILE (as used in other directories) can't be used with goto-gcc as it
2
8
# isn't marked as an executable (target), which CMake requires. Thus construct a
3
9
# path in the same way the symbolic link is created in the goto-cc directory.
4
- add_test_pl_tests("$<TARGET_FILE_DIR:goto-cc>/goto-gcc" )
10
+ add_test_pl_tests("$<TARGET_FILE_DIR:goto-cc>/goto-gcc" ${not_gnu_ld} )
5
11
6
12
add_custom_command (OUTPUT "${CMAKE_CURRENT_SOURCE_DIR} /archives/libour_archive.a"
7
13
COMMAND "$<TARGET_FILE_DIR:goto-cc>/goto-gcc" -c foo.c
@@ -15,3 +21,11 @@ add_custom_command(OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/archives/libour_archive.a
15
21
add_custom_target (libour_archive.a ALL
16
22
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR} /archives/libour_archive.a"
17
23
)
24
+
25
+ if (NOT "${CMAKE_SYSTEM_NAME} " STREQUAL "Windows" )
26
+ set_property (
27
+ TEST "goto-gcc-CORE"
28
+ PROPERTY ENVIRONMENT
29
+ "PATH=$ENV{PATH} :$<TARGET_FILE_DIR:goto-cc>"
30
+ )
31
+ endif ()
Original file line number Diff line number Diff line change 9
9
tests.log : ../test.pl
10
10
11
11
else
12
+ ifeq ($(BUILD_ENV_ ) ,OSX)
13
+ not_gnu_ld = -X gnu-ld-only
14
+ endif
12
15
test : ../../src/goto-cc/goto-gcc
13
- @../test.pl -e -p -c ../../../src/goto-cc/goto-gcc
16
+ @PATH=../../../scripts:$$ PATH \
17
+ ../test.pl -e -p -c ../../../src/goto-cc/goto-gcc $(not_gnu_ld )
14
18
15
19
tests.log : ../test.pl ../../src/goto-cc/goto-gcc
16
- @../test.pl -e -p -c ../../../src/goto-cc/goto-gcc
20
+ @PATH=../../../scripts:$$ PATH \
21
+ ../test.pl -e -p -c ../../../src/goto-cc/goto-gcc $(not_gnu_ld )
17
22
18
23
../../src/goto-cc/goto-gcc : ../../src/goto-cc/goto-cc
19
24
@ln -sf goto-cc ../../src/goto-cc/goto-gcc
Original file line number Diff line number Diff line change @@ -2,11 +2,13 @@ extern char src_start[];
2
2
extern char src_end [];
3
3
extern char dst_start [];
4
4
5
- void * memcpy (void * dest , void * src , unsigned n ){
5
+ void * memcpy (void * dest , void * src , unsigned n )
6
+ {
6
7
return (void * )0 ;
7
8
}
8
9
9
- int main (){
10
+ int main ()
11
+ {
10
12
memcpy (dst_start , src_start , (unsigned )src_end - (unsigned )src_start );
11
13
return 0 ;
12
14
}
File renamed without changes.
Original file line number Diff line number Diff line change 1
- CORE
1
+ CORE gnu-ld-only
2
2
main.c
3
- -o out.gb -T script.ld -nostdlib
3
+ -o out.gb -T script.ld -nostdlib -static -Wall
4
4
^EXIT=0$
5
5
^SIGNAL=0$
6
6
--
7
+ Problem parsing linker script
7
8
^warning: ignoring
8
9
^CONVERSION ERROR$
9
10
--
Original file line number Diff line number Diff line change @@ -2,11 +2,13 @@ extern char src_start[];
2
2
extern char src_size [];
3
3
extern char dst_start [];
4
4
5
- void * memcpy (void * dest , void * src , unsigned n ){
5
+ void * memcpy (void * dest , void * src , unsigned n )
6
+ {
6
7
return (void * )0 ;
7
8
}
8
9
9
- int main (){
10
+ int main ()
11
+ {
10
12
memcpy (dst_start , src_start , (unsigned )src_size );
11
13
return 0 ;
12
14
}
File renamed without changes.
Original file line number Diff line number Diff line change 1
- CORE
1
+ CORE gnu-ld-only
2
2
main.c
3
- -o out.gb -T script.ld -nostdlib
3
+ -o out.gb -T script.ld -nostdlib -static -Wall
4
4
^EXIT=0$
5
5
^SIGNAL=0$
6
6
--
7
+ Problem parsing linker script
7
8
^warning: ignoring
8
9
^CONVERSION ERROR$
9
10
--
Original file line number Diff line number Diff line change 1
1
extern char sym [];
2
2
3
- int main (){
3
+ int main ()
4
+ {
4
5
int foo = (int )sym ;
5
6
return 0 ;
6
7
}
File renamed without changes.
Original file line number Diff line number Diff line change 1
- CORE
1
+ CORE gnu-ld-only
2
2
main.c
3
- -o out.gb -T script.ld -nostdlib
3
+ -o out.gb -T script.ld -nostdlib -static -Wall
4
4
^EXIT=0$
5
5
^SIGNAL=0$
6
6
--
7
+ Problem parsing linker script
7
8
^warning: ignoring
8
9
^CONVERSION ERROR$
9
10
--
Original file line number Diff line number Diff line change @@ -12,15 +12,14 @@ endif
12
12
ifeq ($(BUILD_ENV_ ) ,MSVC)
13
13
excluded_tests = -X gcc-only -X winbug
14
14
else
15
+ ifeq ($(BUILD_ENV_ ) ,OSX)
15
16
# In MacOS, a change in the assert.h header file
16
17
# is causing template errors when exercising the
17
18
# C++ front end (because of a transitive include
18
19
# of <type_traits>) for files that include the
19
20
# <assert.h> or <cassert> headers.
20
- OS := $(shell uname)
21
- ifeq ($(OS),Darwin)
22
- excluded_tests = -X macos-assert-broken
23
- endif
21
+ excluded_tests = -X macos-assert-broken
22
+ endif
24
23
endif
25
24
26
25
default : tests.log
Original file line number Diff line number Diff line change @@ -41,11 +41,18 @@ else()
41
41
COMMAND "${CMAKE_COMMAND} " -E create_symlink
42
42
goto-cc $<TARGET_FILE_DIR:goto-cc>/goto-ld
43
43
BYPRODUCTS ${CMAKE_BINARY_DIR} /bin/goto-ld)
44
+ add_custom_command (TARGET goto-cc
45
+ POST_BUILD
46
+ COMMAND "${CMAKE_COMMAND} " -E copy
47
+ ${CMAKE_CURRENT_SOURCE_DIR} /../../scripts/ls_parse.py
48
+ $<TARGET_FILE_DIR:goto-cc>/ls_parse.py
49
+ BYPRODUCTS ${CMAKE_BINARY_DIR} /bin/ls_parse.py)
44
50
45
51
install (
46
52
FILES
47
53
${CMAKE_BINARY_DIR} /bin/goto-ld
48
54
${CMAKE_BINARY_DIR} /bin/goto-gcc
55
+ ${CMAKE_BINARY_DIR} /bin/ls_parse.py
49
56
DESTINATION
50
57
${CMAKE_INSTALL_BINDIR} )
51
58
endif ()
You can’t perform that action at this time.
0 commit comments