Changeset 468


Ignore:
Timestamp:
Jul 29, 2003, 3:34:54 PM (22 years ago)
Author:
bird
Message:

#460: Prefix /gcc when building gcc.
gccomf rules for building a debuggable version of the things.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile

    • Property cvs2svn:cvs-rev changed from 1.38 to 1.39
    r467 r468  
    419419        all-builttools-dirs \
    420420                $(PATH_BUILTTOOLS)/bin/dllar.cmd \
     421                $(PATH_BUILTTOOLS)/omfhack/ar.exe \
     422                $(PATH_BUILTTOOLS)/omfhack/realar.exe \
     423                $(PATH_BUILTTOOLS)/omfhack/ranlib.exe
    421424               
    422425all-builttools-clean: \
     
    425428       
    426429all-builttools-dirs:
    427         mkdir -p $(PATH_BUILTTOOLS)/bin $(PATH_BUILTTOOLS)/lib $(PATH_BUILTTOOLS)/include
     430        mkdir -p $(PATH_BUILTTOOLS)/bin $(PATH_BUILTTOOLS)/lib $(PATH_BUILTTOOLS)/include $(PATH_BUILTTOOLS)/omfhack
    428431       
    429432$(PATH_BUILTTOOLS)/bin/dllar.cmd $(PATH_BUILTTOOLS_TMP)/bin/dllar.cmd: $(PATH_TOP)/src/misc/dllar.cmd
    430433        cp $< $@
    431 
     434$(PATH_BUILTTOOLS)/omfhack/ranlib.exe $(PATH_BUILTTOOLS_TMP)/omfhack/ranlib.exe: $(PATH_TOP)/tools/bin/true.exe
     435        cp $< $@
     436$(PATH_BUILTTOOLS)/omfhack/ar.exe: $(PATH_EMXPGCC)/bin/emxomfar.exe
     437        cp $< $@
     438$(PATH_BUILTTOOLS_TMP)/omfhack/ar.exe: $(PATH_BUILTTOOLS_TMP)/bin/emxomfar.exe
     439        cp $< $@
     440$(PATH_BUILTTOOLS)/omfhack/realar.exe $(PATH_BUILTTOOLS_TMP)/omfhack/realar.exe: $(PATH_EMXPGCC)/bin/ar.exe
     441        cp $< $@
     442$(PATH_BUILTTOOLS_TMP)/omfhack:
     443        mkdir -p $@
     444       
    432445all-builttools-stage2: \
    433446                all-banner-builttools-stage2 \
     
    436449                all-builttools-stage2-libs \
    437450                $(PATH_BUILTTOOLS_TMP)/bin/dllar.cmd \
     451                $(PATH_BUILTTOOLS_TMP)/omfhack \
     452                $(PATH_BUILTTOOLS_TMP)/omfhack/ar.exe \
     453                $(PATH_BUILTTOOLS_TMP)/omfhack/realar.exe \
     454                $(PATH_BUILTTOOLS_TMP)/omfhack/ranlib.exe \
    438455                all-builttools-clean
    439456        mv -f $(PATH_BUILTTOOLS_TMP) $(PATH_BUILTTOOLS)
     
    691708                --without-included-gettext \
    692709                --with-local-prefix=$(subst \,/,$(PATH_EMXPGCC)) \
    693                 --prefix=$(ALL_PREFIX) \
     710                --prefix=/gcc \
    694711                --with-gnu-ld \
    695712                --with-gnu-as \
     
    703720                --without-included-gettext \
    704721                --with-local-prefix=$(subst \,/,$(PATH_EMXPGCC)) \
    705                 --prefix=$(ALL_PREFIX) \
     722                --prefix=/gcc \
    706723                --with-gnu-ld \
    707724                --with-gnu-as \
     
    744761               
    745762               
    746                
    747                
    748                
    749                
     763##############################################################################
     764###############################################################################
     765###############################################################################
     766#
     767#    G C C   -   O M F   f o r   D e B u G i n g
     768#
     769###############################################################################
     770###############################################################################
     771###############################################################################
     772all-gccomf: gccomf
     773
     774gccomf: gcc-autoconf-refresh \
     775        gccomf-build
     776        echo "Successfully build GCC OMF."
     777
     778# build the components.
     779.PHONY: gccomf-build gccomf-install gccomf-configure
     780gccomf-build gccomf-install gccomf-configure:
     781        mkdir -p $(PATH_OBJ)/gccomf
     782        $(MAKE) -C $(PATH_OBJ)/gccomf -f $(MAKEFILE) $@-it
     783
     784   
     785# Separate since we want the 'e' option
     786gccomf-prompt:                 
     787        mkdir -p $(PATH_OBJ)/gccomf
     788        $(MAKE) -e -C $(PATH_OBJ)/gccomf -f $(MAKEFILE) $@-it
     789gccomf-prompt-it:
     790        chdir $(PATH_OBJ)/gccomf ; \
     791                if test -d $(PATH_BUILTTOOLS)/omfhack; then mv -f $(PATH_BUILTTOOLS)/omfhack $(PATH_BUILTTOOLS)/omfhackbin; fi ; \
     792                unset GCCLOAD; \
     793                export GCC_OMF="real"; \
     794            export LIBGCC2_DEBUG_CFLAGS="-g -Zaout"; \
     795                export       CFLAGS="$(OMFSPEC_HACK) -Zomf -g "; \
     796                export     CXXFLAGS="$(OMFSPEC_HACK) -Zomf -g "; \
     797                export  BOOT_CFLAGS="$(OMFSPEC_HACK) -Zomf -g "; \
     798                export      LDFLAGS="$(OMFSPEC_HACK) -Zomf -g -Zexe -Zcrtdll"; \
     799                export BOOT_LDFLAGS="$(OMFSPEC_HACK) -Zomf -g -Zexe -Zcrtdll"; \
     800                $(subst \,/,$(COMSPEC)) ; \
     801                mv -f $(PATH_BUILTTOOLS)/omfhackbin $(PATH_BUILTTOOLS)/omfhack
     802       
     803
     804# When changed directory
     805#   We pass down alot of flags here, but currently we don't use half of them as
     806#   we're not booting the compiler.
     807
     808#OMFSPEC_HACK = $(if $(wildchar $(PATH_OBJ)/.all-stage1),\
     809#               -specs $(PATH_TOP)/src/emx/src/lib/libc.specs, \
     810#               -specs $(PATH_TOP)/tools/x86.os2/gcc/staged/lib/gcc-lib/i386-pc-os2-emx/$(GCC_VERSION)/specs)
     811OMFSPECS_HACK =
     812gccomf-build-it: \
     813                $(PATH_OBJ)/gccomf/.ts.configured
     814ifeq "$(BUILD_PLATFORM)" "OS2"         
     815        if test -d $(PATH_BUILTTOOLS)/omfhack; then mv -f $(PATH_BUILTTOOLS)/omfhack $(PATH_BUILTTOOLS)/omfhackbin; fi
     816        unset GCCLOAD ; export GCC_OMF="real" ; echo GCC_OMF=$$GCC_OMF; $(MAKE) -C $(PATH_OBJ)/gccomf \
     817            LIBGCC2_DEBUG_CFLAGS="-g -Zaout" \
     818                      CFLAGS="$(OMFSPEC_HACK) -Zomf -g " \
     819                    CXXFLAGS="$(OMFSPEC_HACK) -Zomf -g " \
     820                 BOOT_CFLAGS="$(OMFSPEC_HACK) -Zomf -g " \
     821                     LDFLAGS="$(OMFSPEC_HACK) -Zomf -g -Zexe -Zcrtdll" \
     822                BOOT_LDFLAGS="$(OMFSPEC_HACK) -Zomf -g -Zexe -Zcrtdll" \
     823                all
     824        mv -f $(PATH_BUILTTOOLS)/omfhackbin $(PATH_BUILTTOOLS)/omfhack
     825else
     826        $(MAKE) -C $(PATH_OBJ)/gcc all
     827endif   
     828
     829       
     830# configure it (invoked after directory change).
     831#       We set CC to help configure finding it.
     832gccomf-configure-it $(PATH_OBJ)/gccomf/.ts.configured: $(PATH_TOP)/src/gcc/configure
     833ifeq "$(BUILD_PLATFORM)" "OS2"
     834        $(ASH) -c " \
     835                export CC=\"gcc.exe\" ; \
     836                $< \
     837                --enable-clh \
     838                --enable-threads=os2 \
     839                --enable-shared=libgcc,bfd,opcodes \
     840                --disable-nls \
     841                --without-included-gettext \
     842                --with-local-prefix=$(subst \,/,$(PATH_EMXPGCC)) \
     843                --prefix=/gcc \
     844                --with-gnu-ld \
     845                --with-gnu-as \
     846                --disable-libgcj \
     847                --enable-languages=c,c++ "
     848else
     849        $(ASH) -c "$< \
     850                --disable-clh \
     851                --enable-shared=libgcc,bfd,opcodes \
     852                --disable-nls \
     853                --without-included-gettext \
     854                --with-local-prefix=$(subst \,/,$(PATH_EMXPGCC)) \
     855                --prefix=/gcc \
     856                --with-gnu-ld \
     857                --with-gnu-as \
     858                --disable-libgcj \
     859                --enable-languages=c,c++ "
     860endif
     861        touch $(PATH_OBJ)/gccomf/.ts.configured
     862# TODO: Andy, on Linux --enable-clh result in linking errors.
     863
     864# Install the GCC build
     865#       Repeating the prefix doesn't hurt anybody.
     866gccomf-install-it:
     867        $(MAKE) prefix=$(ALL_PREFIX) install
     868
     869
     870
     871
    750872
    751873###############################################################################
Note: See TracChangeset for help on using the changeset viewer.