File tree Expand file tree Collapse file tree 16 files changed +60
-30
lines changed
linker_script_symbol-only Expand file tree Collapse file tree 16 files changed +60
-30
lines changed Original file line number Diff line number Diff line change @@ -12,15 +12,14 @@ endif
1212ifeq ($(BUILD_ENV_ ) ,MSVC)
1313 excluded_tests = -X gcc-only
1414else
15+ ifeq ($(BUILD_ENV_ ) ,OSX)
1516 # In MacOS, a change in the assert.h header file
1617 # is causing template errors when exercising the
1718 # C++ front end (because of a transitive include
1819 # of <type_traits>) for files that include the
1920 # <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
2423endif
2524
2625test :
Original file line number Diff line number Diff line change @@ -6,15 +6,14 @@ include ../../src/common
66ifeq ($(BUILD_ENV_ ) ,MSVC)
77 excluded_tests = -X gcc-only -X winbug
88else
9+ ifeq ($(BUILD_ENV_ ) ,OSX)
910 # In MacOS, a change in the assert.h header file
1011 # is causing template errors when exercising the
1112 # C++ front end (because of a transitive include
1213 # of <type_traits>) for files that include the
1314 # <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
1817endif
1918
2019test :
Original file line number Diff line number Diff line change @@ -12,15 +12,14 @@ endif
1212ifeq ($(BUILD_ENV_ ) ,MSVC)
1313 excluded_tests = -X gcc-only -X winbug
1414else
15+ ifeq ($(BUILD_ENV_ ) ,OSX)
1516 # In MacOS, a change in the assert.h header file
1617 # is causing template errors when exercising the
1718 # C++ front end (because of a transitive include
1819 # of <type_traits>) for files that include the
1920 # <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
2423endif
2524
2625test :
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+
17# TARGET_FILE (as used in other directories) can't be used with goto-gcc as it
28# isn't marked as an executable (target), which CMake requires. Thus construct a
39# 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} )
511
612add_custom_command (OUTPUT "${CMAKE_CURRENT_SOURCE_DIR} /archives/libour_archive.a"
713 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
1521add_custom_target (libour_archive.a ALL
1622 DEPENDS "${CMAKE_CURRENT_SOURCE_DIR} /archives/libour_archive.a"
1723)
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 99tests.log : ../test.pl
1010
1111else
12+ ifeq ($(BUILD_ENV_ ) ,OSX)
13+ not_gnu_ld = -X gnu-ld-only
14+ endif
1215test : ../../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 )
1418
1519tests.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 )
1722
1823../../src/goto-cc/goto-gcc : ../../src/goto-cc/goto-cc
1924 @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[];
22extern char src_end [];
33extern char dst_start [];
44
5- void * memcpy (void * dest , void * src , unsigned n ){
5+ void * memcpy (void * dest , void * src , unsigned n )
6+ {
67 return (void * )0 ;
78}
89
9- int main (){
10+ int main ()
11+ {
1012 memcpy (dst_start , src_start , (unsigned )src_end - (unsigned )src_start );
1113 return 0 ;
1214}
File renamed without changes.
Original file line number Diff line number Diff line change 1- CORE
1+ CORE gnu-ld-only
22main.c
3- -o out.gb -T script.ld -nostdlib
3+ -o out.gb -T script.ld -nostdlib -static -Wall
44^EXIT=0$
55^SIGNAL=0$
66--
7+ Problem parsing linker script
78^warning: ignoring
89^CONVERSION ERROR$
910--
Original file line number Diff line number Diff line change @@ -2,11 +2,13 @@ extern char src_start[];
22extern char src_size [];
33extern char dst_start [];
44
5- void * memcpy (void * dest , void * src , unsigned n ){
5+ void * memcpy (void * dest , void * src , unsigned n )
6+ {
67 return (void * )0 ;
78}
89
9- int main (){
10+ int main ()
11+ {
1012 memcpy (dst_start , src_start , (unsigned )src_size );
1113 return 0 ;
1214}
File renamed without changes.
You can’t perform that action at this time.
0 commit comments