Date: Sun, 20 Sep 1998 22:07:09 +0200 From: Andreas Klemm <andreas@klemm.gtn.com> To: osa@etrust.ru, current@FreeBSD.ORG Subject: Re: Can't compile XFree86 in elf ... Message-ID: <19980920220709.A15827@klemm.gtn.com> In-Reply-To: <199809201453.SAA10663@ozz.etrust.ru>; from Ozz!!! on Sun, Sep 20, 1998 at 06:53:21PM %2B0400 References: <199809201453.SAA10663@ozz.etrust.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
--jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii On Sun, Sep 20, 1998 at 06:53:21PM +0400, Ozz!!! wrote: > Hello! > How can i compile XFree86 in elf format for my FreeBSD-3.0-BETA-elf? > Does it possible? Ollivier Robert send unofficial patches to the -ports list. See my version in the attachement. Important is to append a "#define ELF" to your local X11 configuration (this is done by the configure script, so one has to change the script). I have hacked the configure script for this purpose. BTW, I used egcs as compiler, therefore the -mcpu=pentium, you should make changes to the patch-za... Only drawback: - Xserver doesn't compile, you have to use a prior version, - Kerberos support is broken, don't use this -- Andreas Klemm http://www.FreeBSD.ORG/~andreas What gives you 90% more speed, for example, in kernel compilation ? http://www.FreeBSD.ORG/~fsmp/SMP/akgraph-a/graph1.html "NT = Not Today" (Maggie Biggs) ``powered by FreeBSD SMP'' --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=patch-za --- config/cf/FreeBSD.cf.orig Sun Jun 29 10:43:25 1997 +++ config/cf/FreeBSD.cf Thu Feb 5 20:03:08 1998 @@ -8,13 +8,13 @@ #define OSVendor /**/ #endif #ifndef OSMajorVersion -#define OSMajorVersion DefaultOSMajorVersion +#define OSMajorVersion 3 #endif #ifndef OSMinorVersion -#define OSMinorVersion DefaultOSMinorVersion +#define OSMinorVersion 0 #endif #ifndef OSTeenyVersion -#define OSTeenyVersion DefaultOSTeenyVersion +#define OSTeenyVersion 0 #endif XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion) @@ -49,7 +49,11 @@ #define MkdirHierCmd mkdir -p -#define CcCmd cc +#ifdef ELF +#define CcCmd /usr/local/bin/gcc -mcpu=pentiumpro +#else +#define CcCmd cc +#endif #define CppCmd /usr/libexec/cpp #define PreProcessCmd CppCmd #define StandardCppDefines -traditional @@ -180,7 +184,11 @@ #if GccUsesGas # define GccGasOption -DGCCUSESGAS -# define AsmDefines -DUSE_GAS +# ifdef ELF +# define AsmDefines -DUSE_GAS -D__ELF__ +# else +# define AsmDefines -DUSE_GAS +# endif #else # define GccGasOption /**/ #endif @@ -210,14 +218,14 @@ /* The GCC strength-reduce bug is fixed for FreeBSD 2.1.5 and later */ #ifndef DefaultGcc2i386Opt #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 5) -#define DefaultGcc2i386Opt -O2 +#define DefaultGcc2i386Opt -pipe -O3 -fno-inline #endif #endif #ifdef i386Architecture # define OptimizedCDebugFlags DefaultGcc2i386Opt #else -# define OptimizedCDebugFlags -O2 +# define OptimizedCDebugFlags -pipe -O3 -fno-inline #endif #ifndef PreIncDir @@ -311,6 +319,12 @@ #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 1) #define HasBsdMake YES #endif + +#define BuildDynamicLoading YES +#define HasSharedLibraries YES +#ifdef ELF +# define UseElfFormat YES +#endif /* ELF */ #ifndef StaticLibrary #define StaticLibrary(libpath,libname) -Wl,-Bstatic Concat(-L,libpath) Concat(-l,libname) -Wl,-Bdynamic --- config/cf/bsdLib.rules.orig Sun May 11 07:04:04 1997 +++ config/cf/bsdLib.rules Sat Jan 31 16:19:44 1998 @@ -228,6 +228,21 @@ #endif /* SharedLibraryTarget */ +#ifndef SharedDepModuleTarget +#define SharedDepModuleTarget(name,deps,solist) @@\ +AllTarget(name) @@\ + @@\ +name: deps @@\ + $(RM) $@~ @@\ + $(CC) -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) BaseShLibReqs @@\ + $(RM) $@ @@\ + $(MV) $@~ $@ @@\ + @@\ +clean:: @@\ + $(RM) name + +#endif /* SharedDepModuleTarget */ + /* * SharedLibraryDataTarget - generate rules to create shlib data file; */ --- config/cf/xf86.rules.orig Sun May 18 14:00:01 1997 +++ config/cf/xf86.rules Sat Jan 31 17:34:21 1998 @@ -162,6 +162,19 @@ /* * DynamicModuleTarget - build a module to be dynamically loaded */ +#ifdef UseElfFormat +#ifndef DynamicModuleTarget +#define DynamicModuleTarget(module,modlist) @@\ +AllTarget(module) @@\ + @@\ +module: modlist @@\ + RemoveFile($@) @@\ + $(CC) -o $@ $(SHLIBLDFLAGS) -Wl,-soname,$@ modlist @@\ + @@\ +clean:: @@\ + RemoveFile(module) +#endif /* DynamicModuleTarget */ +#else #ifndef DynamicModuleTarget #define DynamicModuleTarget(module,modlist) @@\ AllTarget(module) @@\ @@ -173,7 +186,7 @@ clean:: @@\ RemoveFile(module) #endif /* DynamicModuleTarget */ - +#endif /* UseElfFormat */ /* * InstallDynamicModule - install a dynamic module */ --- config/cf/xf86site.def.orig Sun Jun 22 12:32:22 1997 +++ config/cf/xf86site.def Thu Feb 5 19:06:55 1998 @@ -405,8 +405,8 @@ /* * If you don't want to build PEX, uncomment this. * -#define BuildPexExt NO */ +#define BuildPexExt NO /* * If you don't want to build XIE, uncomment this. --- config/cf/xfree86.cf.orig Sun Jul 6 09:28:00 1997 +++ config/cf/xfree86.cf Sat Jan 31 15:32:40 1998 @@ -32,46 +32,46 @@ #define XF86SVGAServer YES #endif #ifndef XF86VGA16Server -#define XF86VGA16Server YES +#define XF86VGA16Server NO #endif #ifndef XF86VGA16DualServer -#define XF86VGA16DualServer YES +#define XF86VGA16DualServer NO #endif #ifndef XF86MonoServer -#define XF86MonoServer YES +#define XF86MonoServer NO #endif #ifndef XF86MonoDualServer -#define XF86MonoDualServer YES +#define XF86MonoDualServer NO #endif #ifndef XF86S3Server -#define XF86S3Server YES +#define XF86S3Server NO #endif #ifndef XF86S3VServer -#define XF86S3VServer YES +#define XF86S3VServer NO #endif #ifndef XF86I8514Server -#define XF86I8514Server YES +#define XF86I8514Server NO #endif #ifndef XF86Mach8Server -#define XF86Mach8Server YES +#define XF86Mach8Server NO #endif #ifndef XF86Mach32Server -#define XF86Mach32Server YES +#define XF86Mach32Server NO #endif #ifndef XF86Mach64Server -#define XF86Mach64Server YES +#define XF86Mach64Server NO #endif #ifndef XF86P9000Server -#define XF86P9000Server YES +#define XF86P9000Server NO #endif #ifndef XF86AGXServer -#define XF86AGXServer YES +#define XF86AGXServer NO #endif #ifndef XF86W32Server -#define XF86W32Server YES +#define XF86W32Server NO #endif #ifndef XF86I128Server -#define XF86I128Server YES +#define XF86I128Server NO #endif #endif --- programs/Xserver/hw/xfree86/os-support/assyntax.h.orig Sun May 11 04:56:22 1997 +++ programs/Xserver/hw/xfree86/os-support/assyntax.h Thu Feb 5 21:06:03 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(__FreeBSD__) || defined(Lynx) || (defined(SYSV) || defined(SVR4)) && !defined(ACK_ASSEMBLER) || (defined(linux) || defined(__OS2ELF__)) && defined(__ELF__) #define GLNAME(a) a #else #define GLNAME(a) CONCAT(_,a) Only in xc/programs/Xserver/hw/xfree86/vga256/drivers/mga/util: Makefile --- programs/Xserver/hw/xfree86/xaa/xf86expblt.c.orig Sat Jul 26 08:30:58 1997 +++ programs/Xserver/hw/xfree86/xaa/xf86expblt.c Fri Feb 6 00:18:17 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(__FreeBSD__) || defined(Lynx) || (defined(SYSV) || defined(SVR4)) && !defined(ACK_ASSEMBLER) || (defined(linux) || defined (__OS2ELF__)) && defined(__ELF__) __asm__( "movl $0,%%ecx\n" "movb %%al,%%cl\n" --jI8keyz6grp/JLjh Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=configure #!/bin/sh yesno () { answ=X; while [ $answ = X ]; do echo -n "$1" read answ if [ X$answ = X ]; then answ="YES"; fi case $answ in y|yes|Y|YES) answ=YES;; n|no|N|NO) answ=NO;; *) echo invalid answer answ=X ;; esac done } F=$WRKDIR/.config configure () { rm -f $F # Tk detection tkversion= for v in 42 80; do if [ -f /usr/local/lib/libtk$v.a ]; then tkversion=$v case $tkversion in 42) tclversion=76 tclLversion=7.6 tkLversion=4.2 ;; 80) tclversion=80 tclLversion=8.0 tkLversion=8.0 ;; esac fi done if [ X$tkversion != X ]; then echo "Using tk-$tkLversion" echo "#define HasTk YES" >>$F echo "#define TkLibDir /usr/local/lib" >>$F echo "#define TkIncDir /usr/local/include/tk$tkLversion" >>$F echo "#define TkLibName tk$tkversion" >>$F echo "#define HasTcl YES" >>$F echo "#define TclLibDir /usr/local/lib" >>$F echo "#define TclIncDir /usr/local/include/tcl$tclLversion" >>$F echo "#define TclLibName tcl$tclversion" >>$F else cat <<EOF *** I don't see the static library for tk version $tkversion in /usr/local/lib. *** XF86Setup will not be installed. If you want to build this program *** install tk 4.2 or 8.0 first. EOF fi cat <<END Which servers do you wish to build, you can save a lot of disk space by only compiling the server you will be using. It will also save you considerable compile time. END if [ X$tkversion != X ]; then echo "*** If you want to use XF86Setup to set the INITIAL configuration," echo "*** then you must build the VGA server" fi # force the compilation of the SVGA server. echo "#undef XF86SVGAServer" >>$F echo "#define XF86SVGAServer YES" >>$F servers="VGA16 VGA16Dual Mono MonoDual S3 S3V I8514 Mach8 Mach32 Mach64 P9000 AGX W32 I128" selected=SVGA for i in $servers; do yesno "Do you want to build the $i server? [YES] " if [ $answ = YES ]; then selected="$selected $i"; fi echo "#undef XF86${i}Server" >>$F echo "#define XF86${i}Server $answ" >>$F done echo ok=0 while [ $ok != 1 ]; do echo -n "default server to install. [none] " read answ if [ X$answ = X ]; then answ=none; ok=1; fi if [ $answ != none ]; then for i in $selected; do if [ $i = $answ ]; then ok=1 echo "#define ServerToInstall XF86_$answ" >>$F fi done fi if [ $ok = 0 ]; then echo you must choose a server among $selected; fi done echo yesno "Do you want to build Xvfb? [YES] " echo "#define XVirtualFramebufferServer $answ" >>$F cat >> $F <<END #define XF86SvgaDrivers nv et4000 et3000 pvga1 gvga ati sis tvga8900 \ cirrus ncr77c22 compaq mga oak al2101 ali \ cl64xx video7 ark mx realtek apm \ s3v s3_svga chips generic #define XF86Vga16Drivers et4000 et3000 ncr77c22 ati sis tvga8900 oak \ cl64xx generic #define XF86Vga2Drivers et4000 et3000 pvga1 gvga ati sis tvga8900 \ cirrus ncr77c22 oak cl64xx generic #define XF86MonoDrivers hgc1280 sigma apollo hercules #define XF86W32Drivers et4000w32 END cat <<END Do you want to install the default system config files, this will overwrite and files that you may be currently using. This would only be required on a first time build. END yesno "Install xdm config? [YES] " if [ $answ = YES ]; then echo "#define InstallXdmConfig $answ" >> $F fi yesno "Install xinit config? [YES] " if [ $answ = YES ]; then echo "#define InstallXinitConfig $answ" >> $F fi yesno "Install xfs config? [YES] " if [ $answ = YES ]; then echo "#define InstallFSConfig $answ" >> $F fi yesno "Do you want to include support for the FontServer? [YES] " echo "#undef BuildFontServer" >>$F echo "#define BuildFontServer $answ" >>$F echo "#undef InstallFSConfig" >>$F echo "#define InstallFSConfig $answ" >>$F cat <<'END' Do you want to Build Fonts (Usually you only want to build and install fonts once, if this is a first time install you will want to build the fonts) END yesno "Build fonts? [YES] " if [ $answ = NO ]; then echo "#define BuildFonts NO" >> $F fi yesno "Build the servers with Extended input devices? [YES] " if [ $answ = NO ]; then echo "#undef BuildXInputExt" >> $F echo "#define BuildXInputExt NO" >> $F else echo "#define JoystickSupport YES" >> $F fi yesno "Build PEX? [YES] " if [ $answ = NO ]; then echo "#define BuildPexExt NO" >> $F fi yesno "Build XIE? [YES] " if [ $answ = NO ]; then echo "#define BuildXIE NO" >> $F fi echo yesno "Build static libraries in addition to shared libraries? [YES] " if [ $answ = YES ]; then echo "#define ForceNormalLib YES" >> $F fi if [ ! `uname -r|grep ^2` ]; then cat <<'END' FreeBSD-3.x has support for Secure RPC. While this scheme is not used for general purpose encryption, some countries restrict the use of strong cryptography. END yesno "Build with Secure RPC? [YES] " if [ $answ = YES ]; then echo "#define HasSecureRPC YES" >> $F fi fi cat <<'END' MIT supplies an authentication mechanism that relies upon DES, this is called XDM-AUTHORIZATION-1. Source code for this authentication mechanism may not be exported from the United States, however, there are compatible replacements for this mechanism available elsewhere. Also, while this scheme is not used for general purpose encryption, some countries restrict the use of strong cryptography. If you have aquired a copy of "Wraphelp.c" and it currently resides in the same location as the XFree86 source or in the ports "files" subdirectory, it will be copied into the right place in the X11 source distribution and support for this feature will be enabled if you answer YES to the following question. If you do not have a copy of this file, even if you answer YES to this question, support will not be enabled. If you wish to change this later, the option controling this is contained the file xc/config/cf/xf86site.def. END yesno "Do you want to enable XDM-AUTHORIZATION-1 support? [YES] " cpwh=NO if [ $answ = YES ]; then WH=$WRKDIR/xc/lib/Xdmcp/Wraphelp.c if [ -f $WH ] ; then echo "==> $WH found in source distribution." elif [ -f $DISTDIR/xc/Wraphelp.c ] ; then echo "==> Wraphelp.c found in DISTDIR directory, copying to source tree." cpwh=$DISTDIR/xc/Wraphelp.c elif [ -f $FILESDIR/Wraphelp.c ] ; then echo "==> Wraphelp.c found in files directory, copying to source tree." cpwh=$FILESDIR/Wraphelp.c else echo "==> Wraphelp.c not found, DES support NOT enabled." cpwh=NO fi fi if [ $cpwh != NO ]; then echo "#define HasXdmAuth $answ" >> $F fi cat <<'END' XDM can be built so that it will get a KerberosIV TGT for your users when they log in. This requires that you have Kerberos on your system when you do this build. Source code for this authentication mechanism may not be exported from the United States, however, there are compatible replacements for this mechanism available elsewhere. Also, while this scheme is not used for general purpose encryption, some countries restrict the use of strong cryptography. Even if you answer YES to the following question, KerberosIV support will not be enabled if the kerberos libraries are unavailable. END yesno "Do you want to enable KerberosIV support? [YES] " cpkb=NO if [ $answ = YES ]; then LIBKRB=/usr/lib/libkrb.a K4PATCH=$FILESDIR/kerberos4.diffs K4XDM="$FILESDIR/krb4auth.c $FILESDIR/krb4auth.h" XDMDIR=$WRKDIR/xc/programs/xdm/ if [ -f $LIBKRB ] ; then echo "==> KerberosIV found in system libraries." cpkb=YES else echo "==> Kerberos libraries not found on system." echo "==> KerberosIV support NOT enabled." cpkb=NO fi fi if [ $cpkb != NO ]; then echo "#define HasKrb4 $answ" >> $F fi echo echo "End of configuration questions. No more user input required" echo } configure if [ X$cpwh != XNO ]; then cp $cpwh $WH fi if [ X$cpkb != XNO ]; then cp $K4XDM $XDMDIR echo "===> Applying KerberosIV patches" patch -s -d $WRKDIR/xc -E -p0 < $K4PATCH fi echo "#define ELF YES" >> $F cat $F >> $WRKDIR/xc/config/cf/xf86site.def exit 0 --jI8keyz6grp/JLjh-- 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?19980920220709.A15827>