From owner-freebsd-current Tue Sep 1 09:53:21 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA09266 for freebsd-current-outgoing; Tue, 1 Sep 1998 09:53:21 -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 JAA09254 for ; Tue, 1 Sep 1998 09:53:13 -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 SAA06758; Tue, 1 Sep 1998 18:51:46 +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 SAA14810; Tue, 1 Sep 1998 18:54:47 +0200 (CEST) (envelope-from joki@shire.domestic.de) Message-Id: <199809011654.SAA14810@yacht.domestic.de> Subject: Re: XFree86 and ELF In-Reply-To: from Tugrul Galatali at "Aug 31, 98 07:23:11 pm" To: galatalt@stuy.edu (Tugrul Galatali) Date: Tue, 1 Sep 1998 18:54:47 +0200 (CEST) Cc: dfr@nlsystems.com, 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 Tugrul Galatali wrote: > > > On Mon, 31 Aug 1998, Doug Rabson wrote: > > > > I have a set of patches for the port. I think that we need to fix the > > weak definition of inet_addr in libc though. > > > > The patches do fix one of the two parts of the problems I had. > Most of the programs in xc/programs now actually link and have binaries, > and all the libraries in xc/lib seem ok. But it completely barfs when > linking XF86_SVGA. I'll send several pages of undefined symbols if anyone > wants. Indeed, this will probably be the leading '_' problem. The following patches built my ELF XFree86 in an ELF world not quite cutting edge: Just put them into the patches/ directory of the port and make. Note that they include the arpa/inet.h patches from another recent mail on -current. --- 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) #endif #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); \ @@\ $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\ LinkBuildSonameLibrary($$SONAME) @@\ $(RM) $@ @@\ @@ -227,6 +227,21 @@ $(RM) Concat(lib,libname.so.rev) #endif /* SharedLibraryTarget */ + +#ifndef SharedDepModuleTarget +#define SharedDepModuleTarget(name,deps,solist) @@\ +AllTarget(name) @@\ + @@\ +name: deps @@\ + $(RM) $@~ @@\ + $(CC) -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + @@\ +clean:: @@\ + $(RM) name + +#endif /* SharedDepModuleTarget */ /* * SharedLibraryDataTarget - generate rules to create shlib data file; --- programs/Xserver/hw/xfree86/os-support/assyntax.h.orig Mon Aug 31 18:06:07 1998 +++ programs/Xserver/hw/xfree86/os-support/assyntax.h Tue Sep 1 00:35:28 1998 @@ -212,7 +212,7 @@ #endif /* ACK_ASSEMBLER */ -#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) --- programs/Xserver/os/connection.c.orig Mon Aug 31 18:06:22 1998 +++ programs/Xserver/os/connection.c Tue Sep 1 00:26:07 1998 @@ -109,6 +109,7 @@ #if defined(TCPCONN) || defined(STREAMSCONN) # include +# include # ifndef hpux # ifdef apollo # ifndef NO_TCP_H --- programs/xauth/gethost.c.orig Tue Sep 1 00:11:48 1998 +++ programs/xauth/gethost.c Tue Sep 1 00:26:26 1998 @@ -58,6 +58,7 @@ #endif #include #include +#include #ifdef SYSV #ifdef i386 #ifndef sco --- programs/xdm/chooser.c.orig Tue Sep 1 00:14:41 1998 +++ programs/xdm/chooser.c Tue Sep 1 00:26:47 1998 @@ -87,6 +87,7 @@ #include #endif #include +#include #else /* MINIX */ #include #include --- programs/xhost/xhost.c.orig Tue Sep 1 00:27:05 1998 +++ programs/xhost/xhost.c Tue Sep 1 00:34:39 1998 @@ -85,9 +85,9 @@ #endif #endif /* NEEDSOCKETS */ -#ifdef notdef +#ifdef __FreeBSD__ #include - bogus definition of inet_makeaddr() in BSD 4.2 and Ultrix + /* bogus definition of inet_makeaddr() in BSD 4.2 and Ultrix */ #else #if !defined(hpux) && !defined(NCR) && !defined(__EMX__) extern unsigned long inet_makeaddr(); --- lib/SM/sm_genid.c.orig Mon Aug 31 18:06:53 1998 +++ lib/SM/sm_genid.c Tue Sep 1 00:27:29 1998 @@ -60,6 +60,7 @@ #include #endif #include +#include #define XOS_USE_NO_LOCKING #define X_INCLUDE_NETDB_H #include --- lib/xtrans/Xtransint.h.orig Mon Aug 31 18:07:41 1998 +++ lib/xtrans/Xtransint.h Tue Sep 1 00:27:56 1998 @@ -102,6 +102,7 @@ #else #include #endif +#include #endif #ifdef __EMX__ #include --- config/cf/FreeBSD.cf.orig Tue Sep 1 08:09:14 1998 +++ config/cf/FreeBSD.cf Tue Sep 1 11:09:13 1998 @@ -222,10 +222,35 @@ #define InstallCmd /usr/bin/install #if GccUsesGas -# define GccGasOption -DGCCUSESGAS -# define AsmDefines -DUSE_GAS +# define GccGasOption -DGCCUSESGAS +# define AsmDefines -DUSE_GAS AsmElfDefines #else # define GccGasOption /**/ +# define AsmDefines AsmElfDefines +#endif + +/* UseElfFormat defaults to YES if __ELF__ set */ +#ifndef UseElfFormat +# ifdef __ELF__ +# undef __ELF__ /* other imake files shouldn't care */ +# define UseElfFormat YES +# else +# define UseElfFormat NO +# endif +#endif + +#if UseElfFormat +# define AsmElfDefines -D__ELF__ +#else +# define AsmElfDefines /**/ +#endif + +#ifndef OSBinaryType +# if UseElfFormat +# define OSBinaryType [ELF] +# else +# define OSBinaryType /**/ +# endif #endif #define ServerExtraDefines GccGasOption XFree86ServerDefines --- programs/Xserver/hw/xfree86/vga256/drivers/s3_svga/s3accel.c.orig Tue Sep 1 16:35:24 1998 +++ programs/Xserver/hw/xfree86/vga256/drivers/s3_svga/s3accel.c Tue Sep 1 16:35:12 1998 @@ -798,7 +798,7 @@ #if defined(__GNUC__) && defined(__i386__) static __inline__ CARD32 reverse_bitorder(CARD32 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" --- programs/Xserver/hw/xfree86/xaa/xf86expblt.c.orig Tue Sep 1 16:46:41 1998 +++ programs/Xserver/hw/xfree86/xaa/xf86expblt.c Tue Sep 1 16:44:23 1998 @@ -83,7 +83,7 @@ #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" 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