Tweak to testsuite/gcc.dg/special/ecos.exp

Jeffrey A Law
Thu Jun 3 21:07:00 GMT 1999

  In message < >you write:
  > This is a multi-part message in MIME format.
  > --------------1AE3C5624F8443671176ABF6
  > Content-Type: text/plain; charset=us-ascii
  > Content-Transfer-Encoding: 7bit
  > The attached trivial patch fixes the problems on many targets because
  > gc-sections is guaranteed to fail if dynamic linking is being attempted.
  > Jifl
  > 1999-05-24  Jonathan Larmour  <>
  >         * gcc.dg/special/ecos.exp: Use -Wl,-static when testing
  > --gc-sections
-Wl,-static is not portable.

gcc -static would be better, but is still not 100% portable because it's 
by the target specific specs, not by any generic code.

One possibility would be to use gcc -static for native systems only since
the vast majority of the ones we care about these days have shared libraries
and support the -static option to force static linking.

Even that isn't 100% safe.  Consider systems where static linking doesn't
actually work because the static libs reference functions/data which are
never defined anywhere (HP & Sun have been notorious for this).  But I can
live with this problem :-)


More information about the Gcc-patches mailing list