-ffunction-sections

Benjamin Kosnik bkoz@redhat.com
Tue Jun 11 09:22:00 GMT 2002


> The if-cross-compiling branch of configure.in states "hard code the
> things which would require linking," but then calls
> CHECK_LINKER_FEATURES anyhow. CHECK_COMPILER_FEATURES only tries to
> compile something, not link, but it's commented out, and its guts are
> hardcoded instead.

Perhaps when the call to CHECK_LINKER_FEATURES was put in place, it only
checked the output of -V? In anycase, if you put the configure bits back
in and build a powerpc-eabism cross compiler, what does the output of
config.log say or do? (Note that the config for powerpc-eabism and say
arm-elf are mindlessly different, because one used libgloss and one uses
newlib for startup files. That's a bit of insanity further up the
toolchain that target libraries have to live with until the staging of
top-level includes, startup files, and support libraries happens.)

> This seems backwards to me; surely we can CHECK_COMPILER_FEATURES
> without needing a linker, and only CHECK_LINKER_FEATURES needs to be
> avoided?

As long as one is 

1) using the "C" compiler, not the C++ compiler

2) using and finding correct binutils and "C" compiler (including all
necessary libraries and startup files)

3) not requiring built executables to execute and run

I would assume that even things that required linking could be
auto-confed. The problem is satisfying the three requirements above in a
simple and sane way. Thus the current hacks.

-benjamin



More information about the Libstdc++ mailing list