From owner-freebsd-current Mon Sep 14 23:06:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA03262 for freebsd-current-outgoing; Mon, 14 Sep 1998 23:06:33 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from frmug.org (frmug-gw.frmug.org [193.56.58.252]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA03257 for ; Mon, 14 Sep 1998 23:06:28 -0700 (PDT) (envelope-from roberto@keltia.freenix.fr) Received: (from uucp@localhost) by frmug.org (8.9.1/frmug-2.3/nospam) with UUCP id IAA13904 for current@FreeBSD.ORG; Tue, 15 Sep 1998 08:06:10 +0200 (CEST) (envelope-from roberto@keltia.freenix.fr) Received: by keltia.freenix.fr (VMailer, from userid 101) id 05C031511; Tue, 15 Sep 1998 08:04:13 +0200 (CEST) Date: Tue, 15 Sep 1998 08:04:13 +0200 From: Ollivier Robert To: current@FreeBSD.ORG Subject: Re: ELF Xfree86? Message-ID: <19980915080413.A5461@keltia.freenix.fr> Mail-Followup-To: current@FreeBSD.ORG References: <87B69798E951207C8525668000055244.0003ACCA85256680@worldbank.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.94.4i In-Reply-To: ; from Alok K. Dhir on Mon, Sep 14, 1998 at 09:43:36PM -0400 X-Operating-System: FreeBSD 3.0-CURRENT/ELF ctm#4637 AMD-K6 MMX @ 200 MHz Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG According to Alok K. Dhir: > I'd be glad to try it... The following patch will work. Apply it on the existing XFree86 port. diff -Nur XFree86/patches/patch-aa XFree86-new/patches/patch-aa --- XFree86/patches/patch-aa Thu Jan 1 01:00:00 1970 +++ XFree86-new/patches/patch-aa Sun Sep 13 20:39:04 1998 @@ -0,0 +1,203 @@ + +--- 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(__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 Sat Jul 19 06:59:16 1997 ++++ lib/xtrans/Xtransint.h Wed Sep 2 07:45:43 1998 +@@ -102,6 +102,8 @@ + #else + #include + #endif ++#include ++#include + #endif + #ifdef __EMX__ + #include +--- config/cf/FreeBSD.cf.orig Wed Sep 2 07:27:49 1998 ++++ config/cf/FreeBSD.cf Wed Sep 2 07:48:43 1998 +@@ -2,7 +2,7 @@ + XCOMM platform: $XFree86: xc/config/cf/FreeBSD.cf,v 3.58.2.12 1998/04/29 04:18:26 dawes Exp $ + + #ifndef OSName +-#define OSName DefaultOSName ++#define OSName DefaultOSName OSBinaryFormat + #endif + #ifndef OSVendor + #define OSVendor /**/ +@@ -114,11 +114,13 @@ + * and they can remove it from the list of directories they add to ld.so.cache + * in their /etc/rc file. + */ ++#ifndef UseElfFormat + #if OSMajorVersion > 2 || (OsMajorVersion == 2 && OSMinorVersion >= 2) + #ifndef ExtraLoadFlags + #define ExtraLoadFlags -Wl,-R,$(USRLIBDIRPATH) + #endif + #endif ++#endif + + #ifndef GnuMallocLibrary + #define GnuMallocLibrary -lgnumalloc +@@ -222,10 +224,19 @@ + #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 ++ ++#if UseElfFormat ++# define AsmElfDefines -D__ELF__ ++# define OSBinaryFormat [ELF] ++#else ++# define AsmElfDefines /**/ ++# define OSBinaryFormat /**/ + #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(__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(__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 + + + diff -Nur XFree86/scripts/configure XFree86-new/scripts/configure --- XFree86/scripts/configure Tue Jul 28 00:30:57 1998 +++ XFree86-new/scripts/configure Sun Sep 13 20:38:38 1998 @@ -267,6 +267,11 @@ echo "#define HasKrb4 $answ" >> $F fi +# ELF detection +test `sysctl -n kern.osreldate` -ge 300004 && + test `objformat` = elf && + echo "#define UseElfFormat YES" >> $F + echo echo "End of configuration questions. No more user input required" echo -- Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- roberto@keltia.freenix.fr FreeBSD keltia.freenix.fr 3.0-CURRENT #64: Fri Sep 11 23:22:44 CEST 1998 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message