Date: Wed, 2 Sep 1998 07:56:01 +0200 (CEST) From: Joachim Kuebart <joki@kuebart.stuttgart.netsurf.de> To: roberto@keltia.freenix.fr (Ollivier Robert) Cc: freebsd-current@FreeBSD.ORG Subject: Re: XFree86 and ELF Message-ID: <199809020556.HAA01498@yacht.domestic.de> In-Reply-To: <19980902004140.A17784@keltia.freenix.fr> from Ollivier Robert at "Sep 2, 98 00:41:40 am"
next in thread | previous in thread | raw e-mail | index | archive | help
Ollivier Robert wrote:
> -#define OSName DefaultOSName
> +#define OSName DefaultOSName OSBinaryType
That's good. I forgot that.
> +/* 3.0 and up are ELF */
> +#if OSMajorVersion > 2
> +#ifndef UseElfFormat
> +#define UseElfFormat YES
> +#endif
> +#endif
This is now solved in scripts/configure (see a recent post from me to
this list.)
> +#if !UseElfFormat
> #if OSMajorVersion > 2 || (OsMajorVersion == 2 && OSMinorVersion >= 2)
> #ifndef ExtraLoadFlags
> #define ExtraLoadFlags -Wl,-R,$(USRLIBDIRPATH)
> #endif
> #endif
> +#endif
Are you sure this is correct? I included it in my new patches below.
> +/* 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
I removed that. All things considered it's silly.
I also tried to tackle the "incomplete type" warning in Xtransint.h
that resulted from netinet/in.h not being included.
I have also simplified the __ELF__ #ifdef's.
So the new patches look like:
--- 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 <bsdLib.tmpl>
#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 <netinet/in.h>
+# include <arpa/inet.h>
# 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 <netdb.h>
#include <netinet/in.h>
+#include <arpa/inet.h>
#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 <socket.h>
#endif
#include <netinet/in.h>
+#include <arpa/inet.h>
#else /* MINIX */
#include <net/hton.h>
#include <net/netlib.h>
--- 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 <arpa/inet.h>
- 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 <socket.h>
#endif
#include <netinet/in.h>
+#include <arpa/inet.h>
#define XOS_USE_NO_LOCKING
#define X_INCLUDE_NETDB_H
#include <X11/Xos_r.h>
--- 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 <socket.h>
#endif
+#include <netinet/in.h>
+#include <arpa/inet.h>
#endif
#ifdef __EMX__
#include <sys/ioctl.h>
--- 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 <http://www.freebsd.org>
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809020556.HAA01498>
