Never mind, it's a NIX bug: https://github.com/NixOS/nixpkgs/issues/18995
On 10/18/2017 8:14 AM, Ryan Johnson wrote:
Hi,
My distribution (nixos 17.03) recently upgraded to gcc-5.4.0, and I
find now that the distribution's gdb-7.12.1 very frequently reports
variables as <optimized out> and inline functions as not available.
I'm trying to isolate a small test case, but meanwhile I wanted to
double check whether I'm doing something silly with my compile flags,
or if this is a known/expected behavior. The compilation command
(filtering out -D, -M and -W flags is):
g++ -o build/unoptimized/foo.o -c src/foo.cpp -fPIC -g -march=corei7
-std=c++11 -pthread -fwrapv -O0 -fno-omit-frame-pointer
g++ -o install/unoptimized/lib/libFoo.so -shared
-Wl,--no-copy-dt-needed-entries -g -pthread -fuse-ld=gold -rdynamic
'-Wl,-rpath,$ORIGIN' '-Wl,-rpath,$ORIGIN/../lib' $OBJECT_FILES
-Wl,-z,defs -Wl,-soname=libFoo.so
Sadly, I can't switch to a more recent version of gcc for this
particular task...
Thoughts?
Ryan