From owner-freebsd-current Tue Sep 1 14:47:29 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA00826 for freebsd-current-outgoing; Tue, 1 Sep 1998 14:47:29 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from shire.domestic.de (kuebart.stuttgart.netsurf.de [194.233.216.182]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA00820 for ; Tue, 1 Sep 1998 14:47:25 -0700 (PDT) (envelope-from joki@kuebart.stuttgart.netsurf.de) Received: from yacht.domestic.de (yacht.domestic.de [192.168.1.4]) by shire.domestic.de (8.8.8/8.8.7) with ESMTP id XAA10909; Tue, 1 Sep 1998 23:45:54 +0200 (CEST) (envelope-from joki@shire.domestic.de) From: Joachim Kuebart Received: (from joki@localhost) by yacht.domestic.de (8.9.1/8.8.7) id XAA06237; Tue, 1 Sep 1998 23:48:57 +0200 (CEST) (envelope-from joki@shire.domestic.de) Message-Id: <199809012148.XAA06237@yacht.domestic.de> Subject: Re: XFree86 and ELF In-Reply-To: <19980901204155.A18859@keltia.freenix.fr> from Ollivier Robert at "Sep 1, 98 08:41:55 pm" To: roberto@keltia.freenix.fr (Ollivier Robert) Date: Tue, 1 Sep 1998 23:48:57 +0200 (CEST) Cc: freebsd-current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Ollivier Robert wrote: > According to Joachim Kuebart: > > --- config/cf/bsdLib.rules.orig Mon Aug 31 18:03:14 1998 > > +++ config/cf/bsdLib.rules Tue Sep 1 01:15:44 1998 > > @@ -153,7 +153,7 @@ > > #define ShLibIncludeFile > > #endif > > #ifndef SharedLibraryLoadFlags > > -#define SharedLibraryLoadFlags -shared -Wl,-rpath,$(USRLIBDIR) > > +#define SharedLibraryLoadFlags -shared -rpath $(USRLIBDIR) > > ...and... > > > #ifndef PositionIndependentCFlags > > #define PositionIndependentCFlags -fPIC > > @@ -213,7 +213,7 @@ > > Concat(lib,libname.so.rev): solist @@\ > > $(RM) $@~ @@\ > > SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; \ @@\ > > - (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ > > + (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) -soname $$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\ > > Why ? Using "gcc" to build the shared lib should work the same as using > "ld". I don't understand the reason... This isn't the only place where SharedLibraryLoadFlags aka. SHLIBLDFLAGS get used. In most places they are used with $(LD) which barf on the -Wl construction. I changed this one usage instead of changing three other places. > > -#if defined(Lynx) || (defined(SYSV) || defined(SVR4)) && !defined(ACK_ASSEMBLER) || (defined(linux) || defined(__OS2ELF__)) && defined(__ELF__) > > +#if defined(Lynx) || (defined(SYSV) || defined(SVR4)) && !defined(ACK_ASSEMBLER) || (defined(__FreeBSD__) || defined(linux) || defined(__OS2ELF__)) && defined(__ELF__) > > #define GLNAME(a) a > > #else > > #define GLNAME(a) CONCAT(_,a) > > Should not be necessary if you modify GccAsmFlags to include -D__ELF__ in > FreeBSD.cf. If you look at the condition you will see that __ELF__ only gets checked on specific operating systems. I made FreeBSD one of the operating systems where __ELF__ is considered relevant. > > #if defined(__GNUC__) && defined(__i386__) > > static __inline__ unsigned int reverse_bitorder(data) { > > -#if defined(Lynx) || (defined(SYSV) || defined(SVR4)) && !defined(ACK_ASSEMBLER) || (defined(linux) || defined (__OS2ELF__)) && defined(__ELF__) > > +#if defined(Lynx) || (defined(SYSV) || defined(SVR4)) && !defined(ACK_ASSEMBLER) || (defined(__FreeBSD__) || defined(linux) || defined (__OS2ELF__)) && defined(__ELF__) > > __asm__( > > "movl $0,%%ecx\n" > > "movb %%al,%%cl\n" > > Same here. gcc already defines __ELF__. gcc does define __ELF__, but the XFree86 makefiles use the following sequence to assemble .s files: $(RM) -f $(name).o $(CPP) -D__ELF__ $(name).s > $(name).i $(AS) -o $(name).o $(name).i Because cpp gets called "manually", __ELF__ needs to be set manually, too. :-( cu Jo --------------------------------------------------------------------- FreeBSD: The Power to Serve Joachim Kuebart Tel: +49 711 653706 Oh god, god... My tongue is asleep and Germany my teeth itch. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message