wsmoses / Tapir-compiler-rt

Other
4 stars 1 forks source link

Allow CilkScale to build on an older compiler #1

Closed wsmoses closed 6 years ago

wsmoses commented 6 years ago

Apparently some c++ std flags aren't being set properly when building CilkScale w/ gcc 4.8.5:

/home/prigoyal/anaconda3/conda-bld/clang+llvm-tapir5.0_1516901601168/work/projects/compiler-rt/lib/cilkscale/csanrt.c: In function ‘initialize_fed_tables’: /home/prigoyal/anaconda3/conda-bld/clang+llvm-tapir5.0_1516901601168/work/projects/compiler-rt/lib/cilkscale/csanrt.c:80:3: error: ‘for’ loop initial declarations ar e only allowed in C99 mode for (int i = 0; i < (int)NUM_FED_TYPES; ++i) { ^ /home/prigoyal/anaconda3/conda-bld/clang+llvm-tapir5.0_1516901601168/work/projects/compiler-rt/lib/cilkscale/csanrt.c:80:3: note: use option -std=c99 or -std=gnu99 t o compile your code /home/prigoyal/anaconda3/conda-bld/clang+llvm-tapir5.0_1516901601168/work/projects/compiler-rt/lib/cilkscale/csanrt.c: In function ‘ensure_fed_table_capacity’: /home/prigoyal/anaconda3/conda-bld/clang+llvm-tapir5.0_1516901601168/work/projects/compiler-rt/lib/cilkscale/csanrt.c:98:3: warning: ISO C90 forbids mixed declarati$ ns and code [-Wpedantic] fed_table_t *table = &fed_tables[fed_type]; ^ /home/prigoyal/anaconda3/conda-bld/clang+llvm-tapir5.0_1516901601168/work/projects/compiler-rt/lib/cilkscale/csanrt.c:106:7: error: ‘for’ loop initial declarations $ re only allowed in C99 mode for (int i = 0; i < table->num_entries; ++i)

neboat commented 6 years ago

Please try updating to the latest commit in the master branch of Tapir-compiler-rt. Recent commits to master address bugs in the relevant CMake files, and I would like to know if those commits address this issue.

wsmoses commented 6 years ago

That was not resolved by ensuring up to date compiler RT.