home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / x / xfree86-.000 / XFree86-3.1.1-Linux-ELF.diff
Text File  |  1995-05-09  |  6KB  |  215 lines

  1. --- xc/config/cf/linux.cf.orig    Sun Feb 12 14:14:12 1995
  2. +++ xc/config/cf/linux.cf    Mon May  8 19:03:46 1995
  3. @@ -4,11 +4,11 @@
  4.  #define OSName            Linux
  5.  #define OSVendor        /**/
  6.  #define OSMajorVersion        1
  7. -#define OSMinorVersion        0
  8. -#define OSTeenyVersion        0
  9. +#define OSMinorVersion        2
  10. +#define OSTeenyVersion        8
  11.  
  12.  #ifndef UseElfFormat
  13. -#define UseElfFormat        NO
  14. +#define UseElfFormat        YES
  15.  #endif
  16.  #define HasGcc            YES
  17.  #define HasGcc2            YES
  18. @@ -37,25 +37,36 @@
  19.  #define NeedWidePrototypes    NO
  20.  
  21.  #if UseElfFormat
  22. -#define CcCmd            gcc -b i486-linuxelf
  23. -#define AsCmd            /usr/i486-linuxelf/bin/as
  24. -#define LdCmd            ld -m elf_i386
  25. -#define AsmDefines        -D__ELF__
  26. -#define CplusplusCmd        g++ -b i486-linuxelf
  27. -#else
  28. -#define CcCmd            gcc
  29. +
  30. +#ifndef USE_ANSI
  31. +/* Don't use any. */
  32. +#define DefaultCCOptions
  33. +#endif
  34. +
  35. +#define CcCmd            gcc 
  36.  #define AsCmd            as
  37.  #define LdCmd            ld
  38. +#define AsmDefines        -D__ELF__
  39. +#define CplusplusCmd        g++
  40. +#define LdCombineFlags        -r -x
  41. +#else
  42. +#define CcCmd            gcc -b i486-linuxaout
  43. +#define AsCmd            /usr/i486-linuxaout/bin/as
  44. +#define LdCmd            /usr/i486-linuxaout/bin/ld -m i386linux
  45.  #define AsmDefines        -DUSE_GAS
  46. +#define LdCombineFlags        -r
  47.  #endif
  48.  #define CppCmd            /lib/cpp
  49. +#ifdef USE_BYACC
  50. +#define YaccCmd            byacc
  51. +#else
  52.  #define YaccCmd            bison -y
  53. +#endif
  54.  #define LexCmd            flex -l
  55.  #define LexLib            -lfl
  56.  #define PreProcessCmd        CcCmd -E
  57.  #define PostIncDir        `CcCmd --print-libgcc-file-name | sed 's/libgcc.a/include/'`
  58. -#define LdCombineFlags        -r
  59. -#define OptimizedCDebugFlags    -O2 -m486
  60. +#define OptimizedCDebugFlags    -pipe -O6 -m486 -fomit-frame-pointer
  61.  #define StandardDefines        -Dlinux -D__i386__ -D_POSIX_SOURCE \
  62.                  -D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE
  63.  #define XawI18nDefines        -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
  64. --- xc/config/cf/lnxLib.rules.orig    Sun Feb 12 14:14:12 1995
  65. +++ xc/config/cf/lnxLib.rules    Mon May  8 19:01:16 1995
  66. @@ -15,6 +15,24 @@
  67.  
  68.  #if UseElfFormat
  69.  
  70. +/*
  71. + *    #define BaseShLibReqs    -lc
  72. + *
  73. + * I don't want to use this since the normal ELF executables should
  74. + * be linked with libc.so. If it is not, i.e., static, the variables in
  75. + * libc.so which is loaded in because of the other shared libraries
  76. + * may have different values than the ones in the static ELF
  77. + * executables. That happens if the binaries are linked with libg.a
  78. + * or libc_p.a.
  79. + *
  80. + * If an ELF executable linked with libg.a or libc_p.a loads a shared
  81. + * object which needs libc.so via dlopen (), I think it should fail.
  82. + * It is a very bad idea. The moral story is DON'T USE dlopen () IN
  83. + * ELF EXECUTABLES LINKED WITH libg.a OR libc_p.a. H.J.
  84. + *
  85. + */
  86. +#define BaseShLibReqs
  87. +
  88.  #ifndef SharedDataSeparation
  89.  #define SharedDataSeparation NO
  90.  #endif
  91. @@ -28,7 +46,7 @@
  92.  #define ShLibIncludeFile <lnxLib.tmpl>
  93.  #endif
  94.  #ifndef SharedLibraryLoadFlags
  95. -#define SharedLibraryLoadFlags --shared
  96. +#define SharedLibraryLoadFlags -shared
  97.  #endif
  98.  #ifndef PositionIndependentCFlags
  99.  #define PositionIndependentCFlags -fPIC
  100. @@ -36,6 +54,9 @@
  101.  #ifndef PositionIndependentCplusplusFlags
  102.  #define PositionIndependentCplusplusFlags -fPIC
  103.  #endif
  104. +#ifndef ExtraLoadFlags
  105. +#define ExtraLoadFlags -Wl,-rpath,/usr/X11R6/lib
  106. +#endif
  107.  
  108.  /*
  109.   * InstallSharedLibrary - generate rules to install the shared library.
  110. @@ -72,7 +93,7 @@
  111.  Concat(lib,libname.so.rev):  solist                    @@\
  112.      $(RM) $@~                            @@\
  113.      (cd down; T=`echo $@ | sed 's/\.[^\.]*$$//'`; \
  114. -        $(LD) -o up/$@~ $(SHLIBLDFLAGS) --soname $$T solist $(REQUIREDLIBS))    @@\
  115. +        $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$T solist $(REQUIREDLIBS) BaseShLibReqs) @@\
  116.      $(RM) $@                             @@\
  117.      $(MV) $@~ $@                            @@\
  118.      $(RM) Concat(lib,libname.so)                    @@\
  119. --- xc/config/cf/lnxLib.tmpl.orig    Sun Feb 12 14:14:12 1995
  120. +++ xc/config/cf/lnxLib.tmpl    Mon May  8 19:01:16 1995
  121. @@ -7,17 +7,39 @@
  122.  
  123.  /* Linux ELF shared libraries are deficient in link semantics */
  124.  #if UseElfFormat
  125. +
  126.  #ifndef FixupLibReferences
  127.  #define FixupLibReferences()                        @@\
  128.  XMULIBONLY = -lXmu                            @@\
  129.  XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB)
  130.  #endif
  131. +
  132.  #ifndef XawClientLibs
  133.  #define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XLIB)
  134.  #endif
  135. -#else
  136. +
  137. +#define CplusplusLibC
  138. +#define FrescoSysLibs    CplusplusLibC MathLibrary
  139. +
  140. +#define SharedX11Reqs
  141. +#define SharedOldXReqs    $(LDPRELIB) $(XLIBONLY)
  142. +#define SharedXtReqs    $(LDPRELIB) $(XLIBONLY) $(SMLIB) $(ICELIB)
  143. +#define SharedXawReqs    $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
  144. +#define SharedXmuReqs    $(LDPRELIB) $(XTOOLLIB) $(XLIB)
  145. +#define SharedXextReqs    $(LDPRELIB) $(XLIBONLY)
  146. +#define SharedXiReqs    $(LDPRELIB) $(XLIB)
  147. +#define SharedPexReqs    $(LDPRELIB) $(XLIBONLY) MathLibrary
  148. +#define SharedXtstReqs    $(LDPRELIB) $(XLIB)
  149. +#define SharedXieReqs    $(LDPRELIB) $(XLIBONLY)
  150. +#define SharedSMReqs    $(LDPRELIB) $(ICELIB)
  151. +#define SharedFrescoReqs    $(LDPRELIB) $(XLIBONLY) FrescoSysLibs
  152. +#define SharedXtfReqs    $(LDPRELIB) $(FRESCOLIB) $(XTOOLLIB) $(XLIB) FrescoSysLibs
  153. +
  154. +#else    /* UseElfFormat */
  155. +
  156.  #ifndef FixupLibReferences
  157.  #define FixupLibReferences()                        @@\
  158.  XMULIB = -lXmu $(XLIB)
  159.  #endif
  160. -#endif
  161. +
  162. +#endif    /* UseElfFormat */
  163. --- xc/config/cf/xf86site.def.orig    Sun Feb 12 14:14:13 1995
  164. +++ xc/config/cf/xf86site.def    Mon May  8 19:09:35 1995
  165. @@ -57,8 +57,8 @@
  166.  /*
  167.   * To build Xvfb, uncomment this.
  168.   *
  169. -#define XVirtualFramebufferServer    YES
  170.  */
  171. +#define XVirtualFramebufferServer    YES
  172.  
  173.  
  174.  /*
  175. @@ -133,8 +133,8 @@
  176.   *
  177.   * For information about using LBX, refer to the README in workInProgress/lbx/.
  178.   *
  179. -#define BuildLBX YES
  180.   */
  181. +#define BuildLBX YES
  182.  
  183.  /*
  184.   * To build the required bits to make LBX selectable via the LinkKit
  185. @@ -224,8 +224,8 @@
  186.   * required.  Make sure HasGcc2ForCplusplus is set to YES when using
  187.   * GCC to build Fresco (see above).
  188.   *
  189. -#define BuildFresco        YES
  190.   */
  191. +#define BuildFresco        YES
  192.  
  193.  /*
  194.   * If you are running Solaris x86, and have the aperture driver installed,
  195. diff -c X11/R6/xc/workInProgress/Fresco/src/os.cxx:1.1.1.1 X11/R6/xc/workInProgress/Fresco/src/os.cxx:1.2
  196. *** X11/R6/xc/workInProgress/Fresco/src/os.cxx:1.1.1.1    Fri Mar 31 01:11:15 1995
  197. --- X11/R6/xc/workInProgress/Fresco/src/os.cxx    Fri Mar 31 01:11:15 1995
  198. ***************
  199. *** 82,88 ****
  200.   #include <sys/utsname.h>
  201.   #endif
  202.   
  203. ! #if !defined(NEED_UTSNAME) 
  204.   #if defined(AIXV3) || defined(__osf__) || defined(__GNUC__)
  205.   extern "C" {
  206.       int gethostname(char *, int);
  207. --- 82,88 ----
  208.   #include <sys/utsname.h>
  209.   #endif
  210.   
  211. ! #if !defined(NEED_UTSNAME) && !defined (__linux__)
  212.   #if defined(AIXV3) || defined(__osf__) || defined(__GNUC__)
  213.   extern "C" {
  214.       int gethostname(char *, int);
  215.