[patch] Update build flags for new compiler feature
Sat Oct 3 13:07:00 GMT 2009
On Oct 3 14:03, Dave Korn wrote:
> Corinna Vinschen wrote:
> > I just built a gcc 4.3.4 Linux->Cygwin cross compiler using the sources
> > from the Cygwin 1.7 distro. I used the following build flags:
> > --disable-bootstrap --enable-version-specific-runtime-libs \
> > --enable-static --enable-shared --enable-shared-libgcc \
> > --disable-__cxa_atexit --with-gnu-ld --with-gnu-as --with-dwarf2 \
> > --disable-sjlj-exceptions --enable-languages=c,c++ --disable-symvers \
> > --enable-threads=posix --with-arch=i686 --with-tune=generic \
> > --with-newlib
> Are you doing something tricky w.r.t. the headers and libs you supply to the
> build process? You appear to be using none-at-all out of --with-headers,
> --with-includes and --with-sysroot.
Nothing special. I need the --with-newlib, otherwise the libstdc++ build
configure:<lineno>: error: No support for this host/target combination.
We talked about this in PM already, back in January.
Btw., I also had to set --disable-__cxa_atexit in contrast to your
--enable-__cxa_atexit. If I don't do that, I get undefined reference
errors (some dso_foo and cxa_foo functions) when building libstdc++.
> > When I try to build Cygwin I get:
> > cc1plus: error: command line option '-muse-libstdc-wrappers' is not
> > supported by this configuration
> > What am I doing wrong?
> Take a look in $objdir/gcc/config.log; what happened during the "checking
> for __wrap__Znaj" test? Hmmmmm, I may have the config set up wrong so it only
> works in bootstrap, not crossbuilds. You could try manually hacking
Apparently. There's no line containing __wrap__Znaj in config.log.
> "-DUSE_CYGWIN_LIBSTDCXX_WRAPPERS=1" into the CFLAGS. Meanwhile, I need to go
Thanks, I'll try that.
> figure out how to make sure and check the target rather than host libraries
> for the presence of a function. (It's worth adding fixing this to the to-do
> list for -2).
While you're at it, there is another problem. When building gcc-4.3.4
as cross, the auto-host.h file contains
/* #undef HAVE_GAS_ALIGNED_COMM */
afterwards. That's quite unlucky, since options.c contains an
int use_pe_aligned_common = HAVE_GAS_ALIGNED_COMM;
So, right now I had to define HAVE_GAS_ALIGNED_COMM to 1 manually in
And, while we're at it, how do I switch on the TSAWARE flag by default?
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
More information about the Cygwin-patches