This is a complete GCC 4.4.2 environment for OS/2.

This archive contains a ready-to-use GCC environment that includes all C, C++
and system libraries, heaaders and tools necessary to compile C and C++
programs on the OS/2 platform. The only external requirement is the kLIBC
Runtime Libraries version 0.6.3 available at:

   ftp://ftp.netlabs.org/pub/libc/libc-0_6_3-csd3.wpi          or
   ftp://ftp.netlabs.org/pub/libc/libc-0.6.3-csd3.zip

Note that if you use a recent version of eComStation (1.2 and above), this
runtime is already installed on your system (the WPI archive will detect this
and will not install it for the second time so it's a preferred way).

The main purpose of this distribution is to simplify setting up an environment
for building Qt applications using the Qt library version 4 for OS/2 (refer to
http://svn.netlabs.org/qt4/ for more information about Qt4 for OS/2). The
reason why such a distribution became necessary is because the original
distribution of GCC 4.4.2 for OS/2 kindly provided by Paul Smedley (available
at http://os2ports.smedley.info/index.php?page=gcc44) is not complete. See the
section called "HOW THIS ZIP IS MADE" below for more details on this topic.

Besides the GCC compiler and its tools, this distribution also contains the
following 3rd-party tools:

  - Patched OpenWatcom linker (necessary to build big executables and DLLs).

  - GNU Make 3.81beta1 to process GNU Makefiles.



INSTALLATION INSTRUCTIONS

  1. Unpack this ZIP archive to some directory, e.g. "D:\Dev\gcc442".

  2. Enter "D:\Dev\gcc442" and start "gcc442.cmd" to set up the environment.

Note that you may copy "gcc442.cmd" to a directory listed in your PATH
environment variable but in this case you will need to specify a full path
to the original directory tree (e.g. "D:\Dev\gcc442") using the GCC_PATH
variable at the top of "gcc442.cmd".

Once you srart "gcc442.cmd", you may check the environment setup by typing:

  gcc --version && make --version && wl /version

which should print something like this:

  gcc (GCC) 4.4.2
  Copyright (C) 2009 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  GNU Make 3.81beta1
  Copyright (C) 2003  Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.
  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
  PARTICULAR PURPOSE.

  This program built for i386-pc-os2-emx
  ** EXPERIMENTAL (HLL) ** Open Watcom Linker Version 1.6beta1 Limited Availability
  Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
  Source code is available under the Sybase Open Watcom Public License.
  See http://www.openwatcom.org/ for details.
  Error! E3033: directive error near '/version'

Now your environment is ready to compile C and C++ programs using the patched
OpenWatcom linker for linking.



HOW THIS ZIP IS MADE

This section is intended for those who wants to re-create this distribution from
separate components it is comprised of (for example, to update some component to
a newer version).

You will need to download the following:

  - GCC 4.4.2:
    http://download.smedley.info/gcc-4.4.2-os2-20091205.zip

  - binutils 2.19.1:
    http://download.smedley.info/binutils-2.19.1-os2-20090427.zip

  - Patched gccenv.cmd:
    http://svn.netlabs.org/qt4/raw-attachment/ticket/110/gccenv.cmd

  - Patched emxomf.exe:
    http://svn.netlabs.org/libc/raw-attachment/ticket/220/emxomf-for-qt-2010-03-12.zip
    
  - GCC 3.3.5 CSD3:
    ftp://ftp.netlabs.org/pub/gcc/GCC-3.3.5-csd3.zip

  - Patched OpenWatcom linker:
    ftp://ftp.netlabs.org/pub/gcc/wl-hll-r1.zip

  - GNU Make 3.81beta1:
    http://unix.os2site.com/pub/binary/make/make-3_81beta1-bin-static.zip

Then perform the following commands:

  1. unzip gcc-4.4.2-os2-20091205.zip -d D:\Dev\gcc442\

  2. rename D:\Dev\gcc442\usr\local44 local442

  3. unzip binutils-2.19.1-os2-20090427.zip -d D:\Dev\gcc442\usr\local442\

  4. rename D:\Dev\gcc442\usr\local442\binutils\readme.os2 readme.os2.binutils

  5. This step is performed manually (e.g. in File Commander) as there is no
     relevant OS/2 command for that: move all files and directories from
     D:\Dev\gcc442\usr\local442\binutils\ to
     D:\Dev\gcc442\usr\local442\ and then delete
     D:\Dev\gcc442\usr\local442\binutils\.

     Keep in mind to skip duplicate files if there are any.

  6. copy gccenv.cmd D:\Dev\gcc442\usr\local442\bin\

  7. unzip -o emxomf-for-qt-2010-03-12.zip -d D:\Dev\gcc442\usr\local442\bin\
  
  8. unzip GCC-3.3.5-csd3.zip usr\bin\emx*.exe usr\bin\ld*.exe usr\bin\as-elf.exe -d D:\Dev\gcc442\
     unzip GCC-3.3.5-csd3.zip usr\bin\*.bin usr\bin\stripomf.exe usr\bin\listomf.exe -d D:\Dev\gcc442\
     unzip GCC-3.3.5-csd3.zip usr\include\* -x usr\include\c++\* -d D:\Dev\gcc442\
     unzip GCC-3.3.5-csd3.zip usr\lib\* -x usr\lib\dbg\* -x usr\lib\gcc-lib\* -x usr\lib\lib*c++.* -d D:\Dev\gcc442\

  9. copy D:\Dev\gcc442\usr\lib\MakeOmfLibs.cmd D:\Dev\gcc442\usr\local442\lib\MakeOmfLibs.cmd

  10. D:\Dev\gcc442\usr\local442\lib\MakeOmfLibs.cmd

  11. unzip -j wl-hll-r1.zip wl-hll-r1\wl.exe -d D:\Dev\gcc442\usr\bin\

  12. unzip make-3_81beta1-bin-static.zip -d -d D:\Dev\gcc442\
      del D:\Dev\gcc442\README.OS2

Then, check you may need to check "gcc442.cmd" contained in the root directory
of this archive and update it if necessary.



AUTHORS

This distribution is prepared by the maintainers of the Qt library for OS/2,
please visit http://svn.netlabs.org/qt4/ if you want to get in contact with
them.

