Can't manage to build ldc, problem seems to be compiling ldc/runtime/profile-rt/profile-rt-38/GCDAProfiling.c
Andrew via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Sun Jul 24 04:32:56 PDT 2016
On Sunday, 24 July 2016 at 08:42:57 UTC, Johan Engelen wrote:
> On Saturday, 23 July 2016 at 16:21:56 UTC, Andrew wrote:
>> On Saturday, 23 July 2016 at 15:57:01 UTC, Johan Engelen wrote:
>>
>>>
>>> Huh?
>>> Perhaps a different compiler is used when building
>>> ldc-profile-rt ?
>>> Can you have a look at the commandline to build
>>> GCDAProfiling.c?
>>
>> Sorry, not sure if I completely understand you. cmake says:
>
> `make VERBOSE=1`, `make -n` or `ninja -v` print out the
> commands used to build the files (so you can also see which
> compile flags are used)
>
>>
>> -- The C compiler identification is GNU 4.9.1
>> -- The CXX compiler identification is GNU 4.9.1
>> -- Check for working C compiler: /software/bin/cc
>> -- Check for working C compiler: /software/bin/cc -- works
>> -- Detecting C compiler ABI info
>> -- Detecting C compiler ABI info - done
>> -- Check for working CXX compiler: /software/bin/c++
>> -- Check for working CXX compiler: /software/bin/c++ -- works
>>
>> /software/bin/cc -c
>> runtime/profile-rt/profile-rt-38/GCDAProfiling.c -o a.o
>>
>> compiles ok
>
> Just to be sure: you are testing without any changes right (so
> with MAP_FILE in the source) ?
Thanks, I never knew about that flag. I am using the default
file. The line that fails is this one:
/software/bin/cc -DLDC_WITH_PGO -std=c11
-I/home/abrown/software/ldc/. -I/home/abrown/software/ldc/ddmd
-I/home/abrown/software/ldc/ddmd/root
-I/home/abrown/software/ldc/build/ddmd
-I/home/abrown/software/ldc -isystem
/Home/abrown/software/llvm/include -isystem
/home/abrown/software/libs/include -fPIC -O3
-DCOMPILER_RT_HAS_ATOMICS=1 -DCOMPILER_RT_HAS_FCNTL_LCK=1 -o
CMakeFiles/ldc-profile-rt.dir/profile-rt/profile-rt-38/GCDAProfiling.c.o -c /home/abrown/software/ldc/runtime/profile-rt/profile-rt-38/GCDAProfiling.c
It fails when I call it myself, but succeeds if I drop the
-std=c11 flag. This I find very puzzling, since I've set in my
environment variables that CFLAGS='-std=c11' so shouldn't the
flag also be set when I just call the compiler without options?
Thanks again for all the help.
Andrew
More information about the digitalmars-d-ldc
mailing list