This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Strange segmentation error issues.


I think my suspicion that there are environment variables passed to
the environment when the LD (GNU gold) is invoked from GCC
is correct.

I compared the output of
 env | sort
under ordinary shell, and
its output when /usr/bin/ (GNU gold on my system) is inovked.

Then I found the differences and I picked up what I think are the
relevant ones below.

I think COLLECT_LTO_WRAPPER is for the link-time optimization.  But I
didn't realizee it was in effect, or was it?.

Maybe if I set these when I run GNU gold manually I get the
segmentation fault. I will investigate more.

I didn't know that there are so many interactions between compiler and linker during compilation.


--- excerpt from the diff of "env | sort" under ordinary shell, and
when ld was invoked from GCC.

+COLLECT_GCC_OPTIONS='-fno-builtin-strlen' '-D' 'fdatasync=fdatasync' '-D' 'DEBUG=1' '-D' 'DEBUG_4GB_CHECK' '-D' 'USEHELGRIND=1' '-o' 'js' '-Wall' '-Wpointer-arith' '-Woverloaded-virtual' '-Werror=return-type' '-Werror=int-to-pointer-cast' '-Wtype-limits' '-Wempty-body' '-Werror=conversion-null' '-Wsign-compare' '-Wno-invalid-offsetof' '-Wcast-align' '-fno-rtti' '-fno-exceptions' '-fno-math-errno' '-std=gnu++11' '-pthread' '-pipe' '-D' 'DEBUG' '-D' '_DEBUG' '-D' 'TRACING' '-gsplit-dwarf' '-g' '-O2' '-freorder-blocks' '-fno-omit-frame-pointer' '-L../../../dist/bin' '-L../../../dist/lib' '-L/REF-OBJ-DIR/objdir-tb3/mozilla/dist/lib' '-rdynamic' '-shared-libgcc' '-mtune=generic' '-march=x86-64'


The above is changed slightly under mozilla thunderbird build, but may not
mean much.


The above looks important.

The followings are set by mozilla thunderbird build infrastructure.

+MAKEFLAGS=rs -j --jobserver-fds=4,5
+MFLAGS=-rs -j --jobserver-fds=4,5

I have no idea what the above is for. Maybe mozilla thunderbird build infrastructure sets this.


[end of memo]

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]