gdb problem

Yann E. MORIN yann.morin.1998@anciens.enib.fr
Thu Aug 18 22:00:00 GMT 2011


Titus, Guylhem, All,

On Wednesday 17 August 2011 23:31:36 Titus von Boxberg wrote:
> Am 17.08.2011 um 22:41 schrieb Guylhem Aznar:
> > -static -L../lib -lncurses -L../lib -lncurses -dynamic   -o tic
> -static is not supported on Darwin.
> 
> Yann, I thought that static linking was disabled now?

Well, It seems that -static is somehow hard-coded in ncurses-5.7.
In ./configure we can see starting at line 16481:

  if test "$GCC" = yes ; then
          case $cf_cv_system_name in #(
          OS/2*|os2*|aix[45]*)    #( vi
                  LDFLAGS_STATIC=
                  LDFLAGS_SHARED=
                  ;;
      *)  #( normally, except when broken
          LDFLAGS_STATIC=-static
          LDFLAGS_SHARED=-dynamic
          ;;
      esac
  else
    [--SNIP--]

Here, GCC is set to yes because we are using GNU gcc, and $cf_cv_system_name
is neither OS/2 nor AIX, so we end up in the default case. LDFLAGS_STATIC is
not set later, so it is set to "-static"

Then, in progs/Makefile.in, line 112 (all on one line, split here for
readability:

  LIBS_TIC = @LDFLAGS_STATIC@ @TICS_ARGS@ @TINFO_ARGS@ \
             @LDFLAGS_SHARED@ @LD_MODEL@ @LIBS@

So we see that both LDFLAGS_STATIC *and* LDFLAGS_SHARED are passed when
linking 'tic'. Bummer... :-(

I just looked at ncurses-5.9, and it's the same... :-/

Titus, did you never encountered the issue on your side?

Well, I'll see if it is sane to pass that through sed to remove -static...
Not tonight, though... So, "on your mark" to beat me to it! ;-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list