ports/146979: editors/emacs configuration ignores "-D WITHOUT_X11"

Anonymous swell.k at gmail.com
Sat May 29 09:30:09 UTC 2010


The following reply was made to PR ports/146979; it has been noted by GNATS.

From: Anonymous <swell.k at gmail.com>
To: wahjava at gmail.com (Ashish SHUKLA)
Cc: keramida at freebsd.org (Giorgos Keramidas),  Paul Hoffman <phoffman at proper.com>,  bug-followup at freebsd.org
Subject: Re: ports/146979: editors/emacs configuration ignores "-D WITHOUT_X11"
Date: Sat, 29 May 2010 09:24:31 +0000

 wahjava at gmail.com (Ashish SHUKLA) writes:
 
 > Anonymous  writes:
 >
 > [...]
 >
 >> I'm aware that ports should use ${PTHREAD_LIBS} (-pthread) but it may be
 >> because of linking flags, e.g. `-nostdlib'.
 >
 > Can you confirm this, and may be generate a patch wiping off '-nostdlib'
 > instead, since build process is adding all other libraries manually.
 
 It's not clear what else GCC skips from reading manpage and whether it
 affects -pthread option.
 
   $ echo 'void main(void) { }' | gcc -v -xc -o/dev/null - -pthread |& fgrep ld-elf
    /usr/bin/ld --eh-frame-hdr -V -dynamic-linker /libexec/ld-elf.so.1 -o/dev/null /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib -L/usr/lib /var/tmp//cc7qVe4q.o -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o
   $ echo 'void main(void) { }' | gcc -v -xc -o/dev/null - -pthread -nostdlib |& fgrep ld-elf
    /usr/bin/ld --eh-frame-hdr -V -dynamic-linker /libexec/ld-elf.so.1 -o/dev/null -L/usr/lib -L/usr/lib /var/tmp//ccOFKiwN.o
 
   $ echo 'void main(void) { }' | gcc45 -v -xc -o/dev/null - -pthread |& fgrep ld-elf
    .../4.5.1/collect2 --eh-frame-hdr -V -dynamic-linker /libexec/ld-elf.so.1 -o /dev/null /usr/lib/crt1.o /usr/lib/crti.o .../4.5.1/crtbegin.o -L.../4.5.1 -L.../4.5.1/../../../../../x86_64-portbld-freebsd9.0/lib -L.../4.5.1/../../.. /var/tmp//cc3SBfLM.o -lgcc --as-needed -lgcc_s --no-as-needed -lpthread -lc -lgcc --as-needed -lgcc_s --no-as-needed .../4.5.1/crtend.o /usr/lib/crtn.o
   $ echo 'void main(void) { }' | gcc45 -v -xc -o/dev/null - -pthread -nostdlib |& fgrep ld-elf
    .../4.5.1/collect2 --eh-frame-hdr -V -dynamic-linker /libexec/ld-elf.so.1 -o /dev/null -L.../4.5.1 -L.../4.5.1/../../../../../x86_64-portbld-freebsd9.0/lib -L.../4.5.1/../../.. /var/tmp//cc0OdbQg.o
 
 Note: -lpthread is only present when -nostdilb is *not* specified.
 
 I'm not sure why we should invent even more hacky way to solve -nostdlib
 issue. I think my REINPLACE_CMD hack is simple enough. And we can
 probably drop BROKEN on 6.x, too.
 
 The interesting question is how other ports that have -nostdlib but need
 threading support handle it.
 
 --
 BTW, pre-everything target should probably be hidden behind WITHOUT_X11 ifdef.



More information about the freebsd-ports-bugs mailing list