#-*- mode: Fundamental; tab-width: 4; -*- # ex:ts=4 # # bsd.gcc.mk - Support for smarter USE_GCC usage. # # Created by: Edwin Groothuis # # For port developers: # If your port needs a specific (minimum) version of GCC, you can easily # specify that with a "USE_GCC=" statement. Unless absolutely necessary # do so by specifying "USE_GCC=X.Y+" which requests at least GCC version # X.Y. To request a specific version omit the trailing + sign. Use of # a Fortran compiler is declared by the USE_FORTRAN knob, not USE_GCC. # # Examples: # USE_GCC= 4.2+ # port requires GCC 4.2 or later. # USE_GCC= 4.7 # port requires GCC 4.7. # # If your port needs a Fortran compiler, please specify that with the # USE_FORTRAN= knob. Here is the list of options for that knob: # # USE_FORTRAN= yes # use gfortran46 (lang/gcc46) # USE_FORTRAN= g77 # use g77-34 (lang/gcc34) # USE_FORTRAN= ifort # use the Intel compiler (lang/ifc) # # Due to object file incompatiblity between Fortran compilers, we strongly # recommend to use only one of them on any system. # # If you are wondering what your port exactly does, use "make test-gcc" # to see some debugging. # # $FreeBSD$ # GCC_Include_MAINTAINER= gerald@FreeBSD.org # All GCC versions supported by the ports framework. Keep them in # ascending order and in sync with the table below. GCCVERSIONS= 030402 040200 040400 040600 040700 # The first field if the OSVERSION in which it appeared in the base. # The second field is the OSVERSION in which it disappeared from the base. # The third field is the version as USE_GCC would use. GCCVERSION_030402= 502126 700042 3.4 GCCVERSION_040200= 700042 9999999 4.2 GCCVERSION_040400= 0 0 4.4 GCCVERSION_040600= 0 0 4.6 GCCVERSION_040700= 0 0 4.7 GCC_DEFAULT_VERSION= 4.6 GCC_DEFAULT_V= ${GCC_DEFAULT_VERSION:S/.//} # No configurable parts below this. #################################### # # Extract the fields from GCCVERSION_... .for v in ${GCCVERSIONS} . for j in ${GCCVERSION_${v}} . if !defined(_GCCVERSION_${v}_L) _GCCVERSION_${v}_L= ${j} . elif !defined(_GCCVERSION_${v}_R) _GCCVERSION_${v}_R= ${j} . elif !defined(_GCCVERSION_${v}_V) _GCCVERSION_${v}_V= ${j} . endif . endfor .endfor # bsd.gcc.mk can also be used for primarily requesting a Fortran compiler. # If we are using GCC we still define whatever we'd usually do for C and # C++ as well. .if defined (USE_FORTRAN) # The default case, with a current lang/gcc port. . if ${USE_FORTRAN} == yes _USE_GCC:= ${GCC_DEFAULT_VERSION} FC:= gfortran${GCC_DEFAULT_V} F77:= gfortran${GCC_DEFAULT_V} # Intel Fortran compiler from lang/ifc. . elif ${USE_FORTRAN} == ifort BUILD_DEPENDS+= ${LOCALBASE}/intel_fc_80/bin/ifort:${PORTSDIR}/lang/ifc RUN_DEPENDS+= ${LOCALBASE}/intel_fc_80/bin/ifort:${PORTSDIR}/lang/ifc FC:= ${LOCALBASE}/intel_fc_80/bin/ifort F77:= ${LOCALBASE}/intel_fc_80/bin/ifort # g77 from lang/gcc34. . elif ${USE_FORTRAN} == g77 _USE_GCC:= 3.4 FC:= g77-34 F77:= g77-34 . else IGNORE= specifies unknown value "${USE_FORTRAN}" for USE_FORTRAN . endif CONFIGURE_ENV+= F77="${F77}" FC="${FC}" FFLAGS="${FFLAGS}" MAKE_ENV+= F77="${F77}" FC="${FC}" FFLAGS="${FFLAGS}" .endif .if defined(USE_GCC) # GCC 4.5 got disconnected 2011-11-12, take care of any uses. .if ${USE_GCC} == "4.5+" USE_GCC= 4.6+ .endif # See if we can use a later version or exclusively the one specified. _USE_GCC:= ${USE_GCC:S/+//} .if ${USE_GCC} != ${_USE_GCC} _GCC_ORLATER:= true .endif # Check if USE_GCC points to a valid version. .for v in ${GCCVERSIONS} . for j in ${GCCVERSION_${v}} . if ${_USE_GCC}==${j} _GCCVERSION_OKAY= true; . endif . endfor .endfor .if !defined(_GCCVERSION_OKAY) IGNORE= Unknown version of GCC specified (USE_GCC=${USE_GCC}) .endif # # Determine current GCCVERSION # .for v in ${GCCVERSIONS} . if exists(${LOCALBASE}/bin/gcc${_GCCVERSION_${v}_V:S/.//}) _GCC_FOUND${v}= port . endif . if ${OSVERSION} >= ${_GCCVERSION_${v}_L} && ${OSVERSION} < ${_GCCVERSION_${v}_R} _GCCVERSION:= ${v} _GCC_FOUND${v}:= base . endif .endfor .if !defined(_GCCVERSION) IGNORE= Couldn't find your current GCCVERSION (OSVERSION=${OSVERSION}) .endif # # If the GCC package defined in USE_GCC does not exist, but a later # version is allowed (for example 4.2+), see if there is a later. # First check if the base installed version is good enough, otherwise # get the first available version. # .if defined(_GCC_ORLATER) . for v in ${GCCVERSIONS} . if ${_USE_GCC} == ${_GCCVERSION_${v}_V} _GCC_MIN1:= true . endif . if defined(_GCC_MIN1) && defined(_GCC_FOUND${v}) && ${_GCC_FOUND${v}}=="base" && !defined(_GCC_FOUND) _GCC_FOUND:= ${_GCCVERSION_${v}_V} . endif . endfor . for v in ${GCCVERSIONS} . if ${_USE_GCC} == ${_GCCVERSION_${v}_V} _GCC_MIN2:= true . endif . if defined(_GCC_MIN2) && defined(_GCC_FOUND${v}) && !defined(_GCC_FOUND) _GCC_FOUND:= ${_GCCVERSION_${v}_V} . endif . endfor . if defined(_GCC_FOUND) _USE_GCC:= ${_GCC_FOUND} . elif ${_USE_GCC} < ${GCC_DEFAULT_VERSION} _USE_GCC:= ${GCC_DEFAULT_VERSION} . endif .endif # defined(_GCC_ORLATER) .endif # defined(USE_GCC) .if defined(_USE_GCC) # A concrete version has been selected. Determine if the installed OS # features this version in the base, and if not then set proper ports # dependencies, CC, CXX, CPP, and flags. .for v in ${GCCVERSIONS} . if ${_USE_GCC} == ${_GCCVERSION_${v}_V} . if ${OSVERSION} < ${_GCCVERSION_${v}_L} || ${OSVERSION} > ${_GCCVERSION_${v}_R} V:= ${_GCCVERSION_${v}_V:S/.//} _GCC_BUILD_DEPENDS:= gcc${V} _GCC_PORT_DEPENDS:= gcc${V} CC:= gcc${V} CXX:= g++${V} CPP:= cpp${V} . if ${_USE_GCC} != 3.4 CFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/${_GCC_BUILD_DEPENDS} LDFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/${_GCC_BUILD_DEPENDS} . if defined (USE_FORTRAN) . if ${USE_FORTRAN} == yes FFLAGS+= -Wl,-rpath=${LOCALBASE}/lib/${_GCC_BUILD_DEPENDS} . endif . endif . endif . endif . endif .endfor .undef V .if defined(_GCC_BUILD_DEPENDS) BUILD_DEPENDS+= ${_GCC_PORT_DEPENDS}:${PORTSDIR}/lang/${_GCC_BUILD_DEPENDS} . if ${_USE_GCC} != 3.4 RUN_DEPENDS+= ${_GCC_PORT_DEPENDS}:${PORTSDIR}/lang/${_GCC_BUILD_DEPENDS} . if ${_USE_GCC} != 4.2 # Later GCC ports already depend on binutils; make sure whatever we # build leverages this as well. USE_BINUTILS= yes . endif . endif .endif .endif # defined(_USE_GCC) test-gcc: @echo USE_GCC=${USE_GCC} @echo USE_FORTRAN=${USE_FORTRAN} .if defined(USE_GCC) .if defined(_GCC_ORLATER) @echo Port can use later versions. .else @echo Port cannot use later versions. .endif .for v in ${GCCVERSIONS} @echo -n "GCC version: ${_GCCVERSION_${v}_V} " .if defined(_GCC_FOUND${v}) @echo -n "(${_GCC_FOUND${v}}) " .endif @echo "- OSVERSION from ${_GCCVERSION_${v}_L} to ${_GCCVERSION_${v}_R}" # @echo ${v} - ${_GCC_FOUND${v}} - ${_GCCVERSION_${v}_L} to ${_GCCVERSION_${v}_R} - ${_GCCVERSION_${v}_V} .endfor @echo Using GCC version ${_USE_GCC} .endif @echo CC=${CC} - CXX=${CXX} - CPP=${CPP} - CFLAGS=\"${CFLAGS}\" @echo F77=${F77} - FC=${FC} - FFLAGS=\"${FFLAGS}\" @echo LDFLAGS=\"${LDFLAGS}\" @echo "BUILD_DEPENDS=${BUILD_DEPENDS}" @echo "RUN_DEPENDS=${RUN_DEPENDS}" Commit message (Expand)AuthorAgeFilesLines * Trim old-style header.hrs2013-04-291-5/+1 * Convert the last USE_ICONV to USES=iconvbapt2013-04-281-1/+1 * Fix typos which can prevent parallel build from working.hrs2013-04-181-0/+17 * Revert r303635 to fix an wrong OPTIONS handling and resolve svgalib dependencyhrs2012-09-053-3/+7 * Fix build on !i386 && !amd64.hrs2012-09-042-1/+3 * Remove _UNSAFE line as this port was fixed alreadyeadler2012-09-041-2/+0 * Mark ports unsafe per wiki page of broken ports.eadler2012-09-031-0/+2 * s/X11BASE/LOCALBASE/, or equivalent.dougb2012-06-252-3/+3 * - Add LICENSE.hrs2012-06-135-395/+989 * - update png to 1.5.10dinoex2012-06-013-3/+23 * New options framework for the portsbapt2012-05-291-0/+5 * Fix a URL in MASTER_SITES.hrs2012-02-131-1/+1 * - Update MASTER_SITES.hrs2012-02-133-7/+15 * - Add LDFLAGS to CONFIGURE_ENV and MAKE_ENV (as it was done with LDFLAGS)amdmi32011-09-241-3/+3 * Use gdkpixbuf2 instead of gdkpixbuf when WITH_GTK is defined.hrs2011-07-201-1/+1 * - Kick MD5 Supportmiwi2011-07-031-2/+0 * Update CONFLICTS lines.hrs2011-06-212-4/+5 * - Fix a problem when opening a PDF file.hrs2011-05-243-2/+13 * - fix build with output device X11dinoex2010-12-161-0/+12 * Sync to new bsd.autotools.mkade2010-12-041-1/+1 * Punt autoconf267->autoconf268ade2010-10-161-1/+1 * Autotools update. Read ports/UPDATING 20100915 for details.ade2010-09-161-2/+2 * Disable the GTK frontend by default.hrs2010-08-212-7/+13 * Use graphics/jbig2dec for libjbig2dec instead of the bundled one.hrs2010-08-032-13/+3 * - Fix compile errors when vgalib and lvga256 drivers are enabled.hrs2010-08-026-12/+99 * - Introduce a new USE_XZ knob that handles lzma/xz compressed distfilespav2010-06-042-3/+4 * Disable the cups driver when either WITHOUT_CUPS=true orhrs2010-05-262-7/+19 * - Make the driver selection stricter and redefine DEVICE_DEVSn in thehrs2010-05-255-135/+296 * Fix "-sDEVICE=ijs -sIjsServer=hpijs" issue.hrs2010-04-112-2/+3 * * Update to 8.71.[1] Changes include:hrs2010-04-036-17/+62 * - update to 1.4.1dinoex2010-03-281-2/+2 * - update to jpeg-8dinoex2010-02-051-1/+2 * Fix build when WITH_FT_BRIDGE=1.hrs2009-12-211-6/+6 * Update to 8.70. Changes include:hrs2009-12-208-1040/+35 * Fix A3 paper handling in the LIPS (Canon LBP series) driver.hrs2009-10-273-1/+36 * - Switch SourceForge ports to the new File Release System: categories startin...amdmi32009-08-221-1/+1 * - update to jpeg7dinoex2009-07-181-2/+2 * Fix LIB_DEPENDS line again.hrs2009-06-021-1/+1 * Fix LIB_DEPENDS line.hrs2009-06-021-2/+2 * Allow building ghostscript8 without CUPS support. The default iskeramida2009-06-021-3/+10 * japanese/font-std, chinese/font-std, and dependency fixups duehrs2009-05-313-18/+20 * - Re-enable cups supportgahr2009-05-181-3/+3 * - Fix build by disabling CUPS support (cyclic dependency)gahr2009-05-151-0/+1 * Fix multiple integer overflows and lack of boundary check foundhrs2009-04-202-1/+990 * - Mark MAKE_JOBS_UNSAFEpav2009-03-301-0/+1 * Update to 8.64. Changes include:hrs2009-03-2922-269/+280 * Update to 8.63. Changes include (quoted from doc/News.htm):hrs2008-11-024-19/+13 * Add a hyphen to ${TAR}'s option. It is useful when ${TAR} ishrs2008-10-051-2/+2 * Fix an issue that print/ghostscript8 does not sethrs2008-10-051-26/+25 * - Remove duplicates from MAKE_ENV after inclusion of CC and CXX in default MA...pav2008-07-251-1/+1 * Remove a workaround for PostScript files generated by oldhrs2008-07-112-11/+1 * - Fix typos in OPTIONS.hrs2008-06-212-283/+296 * Add accidentally-removed PORTREVISION in the previous commit.hrs2008-06-011-0/+1 * Remove unnecessary PKGNAMESUFFIX.hrs2008-06-011-1/+0 * The following repocopies have been done for print/ghostscript-*hrs2008-06-012-11/+14 * - Fix build problem on !i386 platforms[1].hrs2008-05-094-22595/+213 * Fix few typos in the knobs(non-fatal).timur2008-05-081-2/+2 * - fix typoitetcu2008-05-061-1/+1 * Remove SHLIB knob.hrs2008-05-062-27/+11 * - Update to 8.62.hrs2008-05-0520-960/+23250 * - Remove unneeded dependency from gtk12/gtk20 [1]miwi2008-04-201-2/+2 * Incorrect CONFLICTS in multiple ports.edwin2008-04-181-3/+2 * - Bump PORTREVISION for CONFLICTS changedrafan2008-04-161-1/+1 * - lang/gambc, print/ghostscript-gpl, print/ghostscript-gnu all installrafan2008-04-161-0/+2 * The FreeBSD GNOME team is proud to annunce the release of GNOME 2.22.0 formarcus2008-03-243-28/+12 * - When running make config under ghostscript-gpl-nox11, X11 is selected byrafan2008-03-151-2/+6 * - Fix previos commit.miwi2008-03-071-11/+0 * - Fix build on AMD64 when WITH_FT_BRIDGE=yes is enabledmiwi2008-03-071-0/+11 * - As we use .SILENT, no need to use @rafan2008-03-041-35/+35 * - Reduce dependencies by using ijs distribution from linuxprinting.org. Thisrafan2008-03-043-44/+43 * - Fix security issuerafan2008-03-022-1/+13 * - Fix USE_GNOMErafan2008-03-021-1/+2 * - Add full support for Japanese fonts and ijs driverrafan2008-03-016-10/+248 * - Update to 8.61rafan2008-02-298-58/+239 * Adding a post-installation message , telling the user that he needs athierry2008-01-022-0/+7 * Remove print/ghostscript-afpl as it has been replaced by print/ghostscript-gplrafan2007-09-241-1/+1 * - Disable GS_DEVS_SHARED to fix svga drivers buildrafan2007-08-181-1/+1 * - Add missing patch in 8.60 updaterafan2007-08-161-0/+25 * - Update to 8.60. The contributed drivers made by gs-esp are now merged in,rafan2007-08-1615-944/+99 * - Replace USE_XLIB with USE_XORG (xt xext)mm2007-08-042-2/+2 * Fix build when lvga256 or vgalib is enabled.hrs2007-06-042-0/+36 * Update to 8.57.hrs2007-06-0370-5977/+1247 * - Bump PORTREVISION for xorg72 import (automated tool got confused here)pav2007-05-202-2/+1 * - Welcome X.org 7.2 \o/.flz2007-05-201-0/+1 * Use japanese/ipa-ttfonts as the default Japanese TrueTypehrs2007-04-242-17/+6 * rafan@ reports that the hl250 driver "breaks my print/gv on my amd64", solofi2007-03-303-2/+3 * Add hl1250 driver, which adds support for the Brother HL-1250 andlofi2007-03-296-3/+50 * - Update to 8.56rafan2007-03-2843-465/+1050 * - Fix build on gcc 4. These two changes are stole from print/ghostscript-afpl.rafan2007-01-23