Changes to system environment (LynxOS AT)

README for XFree86 3.3 on LynxOS : Compiling the XFree86 Distribution : Changes to system environment (LynxOS AT)
Previous: Disk space requirements
Next: make World

## 3.2. Changes to system environment (LynxOS AT)

Before compiling the XFree86 distribution you will have to make a few little adjustments to your system:

LynxOS AT 2.5

  - Create a shell script named `/lib/cpp` as follows:

    > `

    >         #!/bin/sh
    >         /usr/lib/gcc-lib/i386-unknown-lynxos2.5/2.7-96q1/cpp \
    >     	      -traditional "$@"

    > `

    On other platforms than the AT the paths for the compiler support programs are different. You may use

    > `

    >     	gcc -v

    > `

    to find out the correct path. Set the file mode of `/lib/cpp` with

    > `

    >     	# chown root /lib/cpp
    >     	# chmod 755 /lib/cpp

    > `

  - Modify `/lib/liblynx.a`. The X servers need the `smem_create()` system call to map the frame buffer into their address space. The system call is in `liblynx` library along with other Lynx proprietary calls which (unfortunately) overlap with calls in `libc`. To reduce confusion you should modify `liblynx` as follows:

    > `

    >         # mv /lib/liblynx.a /lib/liblynx.a.ORG
    >         # mkdir /tmp/xx; cd /tmp/xx
    >         # ar xv /lib/liblynx.a.ORG
    >         # ar rv /lib/liblynx.a *smem*
    >         # ranlib /lib/liblynx.a

    > `

LynxOS AT 2.3 and 2.4

  - Use the CYGNUS GNU-C Compiler to build XFree86. With LynxOS 2.3.0 and 2.4.0 you must execute the shell script `/CYGNUS.bash` to apply the necessary changes to your environment.
  - Create a shell script named `/lib/cpp` as follows:

    > `

    >         #!/bin/sh
    >         /cygnus/94q4-lynxos-x86/lib/gcc-lib/i386-lynx/2.6-94q4/cpp \
    >     	      -traditional "$@"

    > `

    It is possible that future releases use a different path for the CYGNUS compiler support programs. You may use

    > `

    >     	gcc -v

    > `

    to find out the correct path. Set the file mode of `/lib/cpp` with

    > `

    >     	# chown root /lib/cpp
    >     	# chmod 755 /lib/cpp

    > `

LynxOS AT 2.2.1

  This has actually never been tested, be prepared that the build will fail somewhere!

  - Create a shell script named `/lib/cpp` as follows:

    > `

    >         #!/bin/sh
    >         /usr/local/lib/gcc-cpp -traditional "$@"

    > `

  - The loader /bin/ld of LynxOS 2.2.1 does not support the -L option which is heavily used by X11R6 makefiles. To work around this problem you must install a small wrapper program which replaces the original /bin/ld program. Use the following steps to install it:

    > `

    >           # cd xc/programs/Xserver/hw/xfree/etc
    >           # cc -o ld ld-wrapper.c
    >           # mv /bin/ld /bin/ld.org
    >           # mv ld /bin/ld
    >           # chmod 511 /bin/ld
    >           # chown root /bin/ld

    > `

  - Modify system header files as follows:
    `/usr/include/uio.h`

      surrounded by

      > `

      >               #ifndef _UIO_H
      >               #define _UIO_H
      >               ...
      >               #endif

      > `

    `/usr/include/utmp.h`

      surrounded by

      > `

      >               #ifndef _UTMP_H
      >               #define _UTMP_H
      >               ...
      >               #endif

      > `

    `/usr/include/unistd.h`

      add

      > `

      >               extern int read();

      > `

README for XFree86 3.3 on LynxOS : Compiling the XFree86 Distribution : Changes to system environment (LynxOS AT)
Previous: Disk space requirements
Next: make World