Changeset 201 for trunk


Ignore:
Timestamp:
Jun 19, 2011, 8:27:54 PM (14 years ago)
Author:
rudi
Message:

Allow to use the Watcom linker WL.EXE bundled with "newer" GCCs. Also increased library page size and set CPU instuction set and optimisation.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.cmd

    r200 r201  
    4646Opt.!GNUMakePath.0          = 0
    4747Opt.!GNUMakePath.!choice    = ''
     48
     49/* linker selection */
     50Opt.!UseWlink   = 1
    4851
    4952/* library version */
     
    284287    call WriteVar G.!ConfigCache, 'Opt.!GNUMakePath.!choice'
    285288
     289    call WriteVar G.!ConfigCache, 'Opt.!UseWlink'
     290
    286291    call WriteVar G.!ConfigCache, 'Opt.!RELEASE'
    287292    call WriteVar G.!ConfigCache, 'Opt.!DLL'
     
    353358    call SaySay '----------------------'
    354359    say
    355     call SaySay 'Currently, Qt/OS2 supports only the Innotek GCC compiler 3.2.2'
    356     call SaySay 'used together with IBM ILINK 3.08 to link native OMF object files'
    357     call SaySay 'generated by GCC into OS/2 executables.'
     360    call SaySay 'Currently, Qt/OS2 supports the Innotek GCC compilers 3.2.2 and 3.3.5'
     361    call SaySay 'used together with Watcom WL.EXE or IBM ILINK 3.08 to link native OMF '
     362    call SaySay 'object files generated by GCC into OS/2 executables.'
     363    call SaySay 'When using the Watcom linker, the LXLite tool is needed as well.'
    358364    say
    359365    call SaySay 'Also, the GNU Make utility version 3.81beta1 or newer is required.'
     
    371377    call WriteConfigCache
    372378
    373     do until (Opt.!ILINKPath \= '')
    374         Opt.!ILINKPath = MenuSelectPath(,
    375             'Opt.!ILINKPath',,
    376             'Select where to search for an ILINK installation:',,
    377             'ilink.exe', 'CheckILINKPath',  'CheckILINKVersion',,
    378             'ERROR: Could not find a valid ILINK installation'||G.!EOL||,
    379             'in ''%1''!'||G.!EOL||,
    380             'Please read the documentation.')
    381     end
     379    G.!Choices.0 = 2
     380    G.!Choices.1 = 'Watcom linker bundled with GCC'
     381    G.!Choices.2 = 'IBM linker from VisualAge C++'
     382    choice = GetChoice('Select the linker type:', 'G.!Choices', -Opt.!UseWlink + 2)
     383    Opt.!UseWlink = -choice + 2
     384
     385    if Opt.!UseWlink = 0 then do
     386        do until (Opt.!ILINKPath \= '')
     387            Opt.!ILINKPath = MenuSelectPath(,
     388                'Opt.!ILINKPath',,
     389                'Select where to search for an ILINK installation:',,
     390                'ilink.exe', 'CheckILINKPath',  'CheckILINKVersion',,
     391                'ERROR: Could not find a valid ILINK installation'||G.!EOL||,
     392                'in ''%1''!'||G.!EOL||,
     393                'Please read the documentation.')
     394        end
     395    end
     396
    382397    call WriteConfigCache
    383398
     
    396411    say
    397412    call SaySay 'Compiler     : Innotek GCC ('Opt.!GCCPath')'
    398     call SaySay 'Linker       : IBM ILINK ('Opt.!ILINKPath')'
     413    if Opt.!UseWlink = 0 then
     414        call SaySay 'Linker       : IBM ILINK ('Opt.!ILINKPath')'
     415    else
     416        call SaySay 'Linker       : Watcom linker in GCC path'
    399417    call SaySay 'Make Utility : GNU Make ('Opt.!GNUMakePath')'
    400418    say
     
    449467     */
    450468    call lineout G.!QtCmd, '/* setup the GCC environment */'
    451     call lineout G.!QtCmd, '''call'' GCC_PATH''\bin\gccenv.cmd'' GCC_PATH ''VAC308'''
     469    if Opt.!UseWlink then do
     470        call lineout G.!QtCmd, '''call'' GCC_PATH''\bin\gccenv.cmd'' GCC_PATH ''WLINK'''
     471    end
     472    else do
     473        call lineout G.!QtCmd, '''call'' GCC_PATH''\bin\gccenv.cmd'' GCC_PATH ''VAC308'''
     474    End
    452475    call lineout G.!QtCmd, ''
    453476    call lineout G.!QtCmd, 'call value ''QMAKESPEC'', QMAKESPEC, ''OS2ENVIRONMENT'''
     
    483506     *  the beginning)
    484507     */
    485     call ConfigureCompiler_GenAddPathEnv 'PATH',,
    486         Opt.!GCCPath.!path';'Opt.!ILINKPath.!path';'Opt.!GNUMAKEPath.!path
    487     call ConfigureCompiler_GenAddPathEnv 'BEGINLIBPATH',,
    488         Opt.!GCCPath.!libpath';'Opt.!ILINKPath.!libpath';'Opt.!GNUMAKEPath.!libpath
     508    if Opt.!UseWlink = 0 then do
     509        call ConfigureCompiler_GenAddPathEnv 'PATH',,
     510            Opt.!GCCPath.!path';'Opt.!ILINKPath.!path';'Opt.!GNUMAKEPath.!path
     511        call ConfigureCompiler_GenAddPathEnv 'BEGINLIBPATH',,
     512            Opt.!GCCPath.!libpath';'Opt.!ILINKPath.!libpath';'Opt.!GNUMAKEPath.!libpath
     513    end
     514    else do
     515        call ConfigureCompiler_GenAddPathEnv 'PATH',,
     516            Opt.!GCCPath.!path';'Opt.!GNUMAKEPath.!path
     517        call ConfigureCompiler_GenAddPathEnv 'BEGINLIBPATH',,
     518            Opt.!GCCPath.!libpath';'Opt.!GNUMAKEPath.!libpath
     519    end
     520
    489521    call lineout G.!QtCmd, ''
    490522    call lineout G.!QtCmd, '/*'
  • trunk/mkspecs/os2-g++/qmake.conf

    r157 r201  
    44# qmake configuration for os2-g++
    55#
    6 # Written for Innotek GCC and IBM ILINK
     6# Written for Innotek GCC and IBM ILINK or OpenWatcom WLINK
    77#
    88# :mode=makefile:tabSize=8:indentSize=4:noTabs=true:
     
    2828
    2929QMAKE_CC                = gcc
    30 QMAKE_CFLAGS            = -Zomf
     30QMAKE_CFLAGS            = -Zomf -march=i486 -mcpu=i686
    3131QMAKE_CFLAGS_WARN_ON    = -Wall
    3232QMAKE_CFLAGS_WARN_OFF   = -w
     
    101101
    102102QMAKE_LINK              = g++
    103 QMAKE_LFLAGS            = -Zomf -Zstack 0x2000 -Zmap
    104 QMAKE_LFLAGS_RELEASE    = -s -Zlinker /EXEPACK:2
     103QMAKE_LINKER_TYPE       = $$(EMXOMFLD_TYPE)
     104contains(QMAKE_LINKER_TYPE, WLINK) {
     105    CONFIG             *= exepack
     106    QMAKE_LFLAGS        = -Zomf -Zstack 0x2000 -Zmap -Zlinker "DISABLE 1121"
     107    QMAKE_LFLAGS_RELEASE = -s
     108} else {
     109    QMAKE_LFLAGS        = -Zomf -Zstack 0x2000 -Zmap
     110    QMAKE_LFLAGS_RELEASE = -s -Zlinker /EXEPACK:2
     111}
    105112QMAKE_LFLAGS_DEBUG      =
    106113QMAKE_LFLAGS_CONSOLE    = -Zlinker /PM:VIO
     
    125132
    126133QMAKE_RUN_LINK          = $(LINK) $(LFLAGS) -o $(TARGET) $(DEF_FILE) @$$qmake_objects.target $(LIBS)
    127 QMAKE_RUN_IMPLIB        = emximp -p 64 -o $(basename $(TARGET)).lib $(DEF_FILE)
     134QMAKE_RUN_IMPLIB        = emximp -p128 -o $(basename $(TARGET)).lib $(DEF_FILE)
     135QMAKE_RUN_EXEPACK       = lxlite /B- $(TARGET)
     136
     137exepack:QMAKE_POST_LINK = $(if $(findstring QT_NO_DEBUG, $(CFLAGS)), $$QMAKE_RUN_EXEPACK)
    128138
    129139QMAKE_RUN_GENDEF        = \
     
    147157QMAKE_LIBS_QT_ENTRY     =
    148158
    149 QMAKE_LIB               = emxomfar r
     159QMAKE_LIB               = emxomfar -p128 r
    150160QMAKE_RUN_LIB           = $(LIB) $(TARGET) $(OBJECTS) $(OBJMOC)
    151161
  • trunk/qmake/Makefile.os2-g++

    r8 r201  
    33#
    44CXX         =   g++
    5 CFLAGS      =   -c -o$@ -O -s -Zomf \
     5CFLAGS      =   -c -o$@ -O -s -Zomf -march=i486 -mcpu=i686 \
    66                -I. -Igenerators -Igenerators\unix -Igenerators\win32 -Igenerators\os2 -Igenerators\mac -I..\include -I..\src\tools \
    77                -I..\mkspecs\os2-g++ \
    88                -DQT_NO_TEXTCODEC -DQT_LITE_COMPONENT -DQT_NODLL -DQT_NO_STL -DQT_NO_COMPRESS -DHAVE_QCONFIG_CPP
    99CXXFLAGS    =   $(CFLAGS)
    10 LFLAGS      =   -s -Zomf -Zstack 0x2000 -Zlinker /PM:VIO -Zlinker /EXEPACK:2
     10LFLAGS      =   -s -Zomf -Zstack 0x2000 -Zlinker /PM:VIO
     11
     12ifeq ($(EMXOMFLD_TYPE),WLINK)
     13    EXEPACK = && lxlite /B- qmake.exe
     14else
     15    LFLAGS += -Zlinker /EXEPACK:2
     16endif
     17
    1118LIBS        =   -lregistry.dll
    12 LINKQMAKE   =   g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS)
     19LINKQMAKE   =   g++ $(LFLAGS) -o qmake.exe $(OBJS) $(QTOBJS) $(LIBS) $(EXEPACK)
    1320ADDCLEAN    =
    1421
  • trunk/qmake/generators/os2/gnumake.cpp

    r152 r201  
    253253        if ( !project->isEmpty( "RES_FILE" ) && !project->isEmpty( "QMAKE_RUN_RC_EXE" ) )
    254254            t << "\n\t" << var("QMAKE_RUN_RC_EXE");
     255        if ( !project->variables()["QMAKE_POST_LINK"].isEmpty() )
     256            t << "\n\t" << var( "QMAKE_POST_LINK" );
    255257        if ( project->isActiveConfig("dll") && !project->isEmpty( "QMAKE_RUN_IMPLIB" ) )
    256258            t << "\n\t" << var( "QMAKE_RUN_IMPLIB" );
Note: See TracChangeset for help on using the changeset viewer.