Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support GCC7 on Linux #2134

Merged
merged 1 commit into from
Aug 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -463,11 +463,11 @@ libponyc.benchmarks.links = libgbenchmark libponyc libponyrt llvm
libponyrt.benchmarks.links = libgbenchmark libponyrt

ifeq ($(OSTYPE),linux)
ponyc.links += libpthread libdl
libponyc.tests.links += libpthread libdl
libponyrt.tests.links += libpthread libdl
libponyc.benchmarks.links += libpthread libdl
libponyrt.benchmarks.links += libpthread libdl
ponyc.links += libpthread libdl libatomic
libponyc.tests.links += libpthread libdl libatomic
libponyrt.tests.links += libpthread libdl libatomic
libponyc.benchmarks.links += libpthread libdl libatomic
libponyrt.benchmarks.links += libpthread libdl libatomic
endif

ifeq ($(OSTYPE),freebsd)
Expand Down
7 changes: 4 additions & 3 deletions src/libponyc/codegen/genexe.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ static bool link_exe(compile_t* c, ast_t* program,
const char* export = target_is_linux(c->opt->triple) ?
"-Wl,--export-dynamic-symbol=__PonyDescTablePtr "
"-Wl,--export-dynamic-symbol=__PonyDescTableSize" : "-rdynamic";
const char* atomic = target_is_linux(c->opt->triple) ? "-latomic" : "";

size_t ld_len = 512 + strlen(file_exe) + strlen(file_o) + strlen(lib_args)
+ strlen(arch) + strlen(mcx16_arg) + strlen(fuseld)
Expand All @@ -284,9 +285,9 @@ static bool link_exe(compile_t* c, ast_t* program,
#ifdef PONY_USE_LTO
"-flto -fuse-linker-plugin "
#endif
"%s %s %s %s -lpthread %s -lm %s",
linker, file_exe, arch, mcx16_arg, fuseld, file_o, lib_args, ponyrt, ldl,
export
"%s %s %s %s -lpthread %s %s -lm %s",
linker, file_exe, arch, mcx16_arg, atomic, fuseld, file_o, lib_args,
ponyrt, ldl, export
);

if(c->opt->verbosity >= VERBOSITY_TOOL_INFO)
Expand Down