I have build a Cilk Plus capable gcc to a local directory.
@:~/cilk_plus_tests/fibonacci $ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/raid/home//repository/sw/cilk_build/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ./configure --prefix=/home//repository/sw/cilk_build/ Thread model: posix gcc version 4.8.0 20120408 (experimental) (GCC)I built the GCC with the following order
1. GMP 2. MPFR 3. MPC 4. Libelf 5. GCC 6. BinutilsI am trying to build the fibonacci.c Cilk program that is known to work.
#include #include #include #include int fib(long long int n) { long long int x, y; if (n < 2) return n; else { x = cilk_spawn fib(n-1); y = cilk_spawn fib(n-2); cilk_sync; return x + y; } } int main(int argc, char *argv[]) { int n; long long int result; n = atoi(argv[1]); result = fib(n); printf("%d\\t%dn", n, result); return 0; }When I build to create a shared executable: $BUILD_PATH/gcc -g -o parallel_shared fib_cilk.c -I $BUILD_PATH/include -lcilkrts Build fails with error:
/tmp/ccg1ZjDO.s: Assembler messages: /tmp/ccg1ZjDO.s: Error: .size expression for fib does not evaluate to a constant /tmp/ccg1ZjDO.s: Error: .size expression for __cilk_spawn_001.2925 does not evaluate to a constant /tmp/ccg1ZjDO.s: Error: .size expression for __cilk_spawn_002.2942 does not evaluate to a constant make: *** [build] Error 1When I try building this statically: $BUILD_PATH/gcc -g -o parallel_static fib_cilk.c -I $BUILD_PATH/include -L $BUILD_PATH/lib -shared I still get the same error above. Can someone give me pointers to where it might be failing ? Also I want to know if static executables can be built at all with Cilk ? Rahul


