summaryrefslogtreecommitdiff
path: root/mk/compiler/gcc.mk
AgeCommit message (Collapse)AuthorFilesLines
2008-02-07Replaced _PKG_SILENT and _PKG_DEBUG with RUN.rillig1-7/+7
XXX: Why do we have the exactly same code in all the files?
2007-08-11When calling gcc to extract the version number, pass downjoerg1-2/+2
ALL_ENV as well. This ensures that any locale settings are overridden and the output matches what pkgsrc expects. This should fix some of the strange bootstrap issues seen over time that were seemingly fxied by USE_NATIVE_GCC=yes.
2007-08-02Add core of the infrastructure support for cross-compilation.joerg1-14/+17
- USE_CROSS_COMPILATION activates it, CROSS_DESTDIR specifies root of the target filesystem - derive _CROSS_DESTDIR from CROSS_DESTDIR or MAKEOBJDIR - buildlink3.mk prefixes the files to symlink with _CROSS_DESTDIR - compiler/gcc.mk knows about the target prefix (e.g. i386--netbsdelf) - PKG_DBDIR is prefixed with _CROSS_DESTDIR - package-install and bin-install are not called with su - install and strip are redirected to the tool version - links for the target specific ar, as, ld, nm, objdump, ranlib and strip are added - compiler wrapper detect if linking is requested or not - special command sinks for CPP and CC/CXX add the cross-compile magic: - modify include dirs to get the target /usr/include - modify linker dirs and runpath to use target /usr/lib at link time, but keep correct rpath entries Supported-by: Google SoC 2007 Basic tests by he@ on Sparc. Review from jlam@.
2007-02-10Replaced the deprecated PKG_SKIP_REASON with PKG_FAIL_REASON.rillig1-2/+2
2007-01-08gcc2 does not support -std=c99. If c99 is needed, requiregavan1-1/+6
at least gcc 3.0.
2006-12-15Remove trailing spaces.martti1-3/+3
2006-12-06Don't force strict C99 mode by default, but the relaxed GNU-C99 mode.joerg1-2/+2
2006-12-02Instead of setting compiler flags in each package if it uses C99,jschauma1-1/+5
allow USE_LANGUAGES+=c99 and let gcc and mipspro do the right thing. May need to be reviewed/added for other compilers. ok rillig@
2006-10-22Added header comments.rillig1-1/+4
2006-07-06On Solaris set _COMPILER_ABI_FLAG.64 to be consistent with the sunpromarkd1-1/+5
settings.
2006-04-05Change _GCC_DIST_VERSION from 3.4.5 to 3.4.6 to reflect update toshannonjr1-2/+2
lang/gcc34.
2006-02-10Bump '_GCC_DIST_VERSION' to '3.4.5' to match lang/gcc34shannonjr1-2/+2
2005-05-31Updated _GCC_DIST_VERSION from 3.4.3 to 3.4.4 to reflect recent updateshannonjr1-2/+2
to lang/gcc34.
2005-03-24USE_BUILDLINK3 is no longer optional (and cannot be turned off). Per mailtv1-12/+4
to tech-pkg: ===== * USE_BUILDLINK3=YES will be unconditional. (In fact, USE_BUILDLINK3 will be ignored altogether by mk/; but see below.) * NO_BUILDLINK and NO_WRAPPER will be ignored by mk/. If a build happens, these phases will happen. * The existing NO_BUILD will imply the previous NO_BUILDLINK and NO_WRAPPER. If no build happens, those phases are not needed. * NO_TOOLS will be ignored by mk/. The tools phase, which provides much more than just the C compiler, will always happen regardless of package. This will make metapackage builds only slightly slower, in trade for far less user error.
2005-01-21Re-add direct symlink logic, optional under GCC_USE_SYMLINKS=yes. Savestv1-2/+8
one fork/exec step on platforms where gcc is compiled with hardcoded gcc-lib pathnames. This applies to most platforms, but the default currently remains not to use symlinks so as to avoid unexpected gotchas for users.
2005-01-12Nuke USE_FORTRAN and bring the f2c handling within the mk/compilerjlam1-1/+18
framework. The list of changes include: * Modify compiler.mk so that "c" is always prepended to USE_LANGUAGES, so we no longer need to say it in package Makefiles. Packages should now append to USE_LANGUAGES instead of setting it. * Create mk/compiler/f2c.mk which implements another pseudo-compiler "f2c" that may be used with any C compiler backend, e.g. PKGSRC_COMPILER= f2c ccache gcc * Teach the various "real" compiler files, e.g., sunpro.mk, mipspro.mk, etc., to use f2c if the native Fortran compiler isn't present. Packages that use Fortran should now simply include the line: USE_LANGUAGES+= fortran in the package Makefile.
2004-11-30Modify the way that the toolchain variables, e.g. CC, CPP, CXX, LD, etc.,jlam1-21/+28
are handled. The idea now is to simply remove the paths in the values of these variables, leaving behind only the basename plus any arguments, e.g.: CC= /usr/local/bin/gcc becomes CC= gcc CPP= /usr/local/bin/gcc -E becomes CPP= gcc -E The wrapper scripts are generated for every unique executable mentioned by the toolchain variables, so for the example above, only a "gcc" wrapper script is generated for ${CC} and ${CPP}. PKG_{CC,CPP,CXX,etc.} are the paths to the executables wrapped by the wrapper scripts. Note that it's now possible to set "CC" to something more than just the path to the compiler, e.g. CC= cc -ffast-math -funroll-loops -fomit-frame-pointer and the full value of ${CC} will be passed through via CONFIGURE_ENV and MAKE_ENV.
2004-11-23Use CCPATH instead of referring to the C compiler by its full path injlam1-5/+5
multiple places.
2004-11-23add {CC,CXX,FC,F77}PATH variables which give the complete path anddmcmahill1-1/+5
name of the {CC,CXX,FC,F77} compilers. These will be used by pkgs which need to know which compiler and where it is at run time. Approved by jlam@
2004-11-22Now that no package uses USE_GCC_SHLIB any longer, remove supportwiz1-7/+7
for it from compiler.mk. Move the variable of the same name used by compiler/gcc.mk and the gcc* buildlink3 files into private namespace (_USE_GCC_SHLIB).
2004-11-10Update _GCC_DIST_VERSION to 3.4.3shannonjr1-2/+2
2004-09-23Teach gcc.mk about gcc34 so that setting GCC_REQD=3.4 in /etc/mk.conf willjlam1-5/+35
make pkgsrc do the right thing.
2004-09-23Support the ABI flags on MIPS platforms.jlam1-10/+12
2004-08-27Replace RPATH_FLAG with LINKER_RPATH_FLAG and COMPILER_RPATH_FLAG,jlam1-5/+8
which are the full option names used to set rpath directives for the linker and the compiler, respectively. In places were we are invoking the linker, use "${LINKER_RPATH_FLAG} <path>", where the space is inserted in case the flag is a word, e.g. -rpath. The default values of *_RPATH_FLAG are set by the compiler/*.mk files, depending on the compiler that you use. They may be overridden on a ${OPSYS}-specific basis by setting _OPSYS_LINKER_RPATH_FLAG and _OPSYS_COMPILER_RPATH_FLAG, respectively. Garbage-collect _OPSYS_RPATH_NAME and _COMPILER_LD_FLAG.
2004-07-06Retire buildlink2, now that all packages using it have been converted towiz1-6/+2
buildlink3.
2004-07-03gcc 3.3.4 is in pkgsrc now.grant1-2/+2
2004-05-17Check that MABIFLAG is defined before checking that it's non-empty. Thisjlam1-3/+3
avoids breakage if MABIFLAG isn't defined.
2004-05-17Allow use of 32bit gcc compiled from pkgsrc on 64bit Irix for a defaultjschauma1-4/+10
ABI of 64.
2004-05-12If ABI is set, LDFLAGS also needs the proper flag.jschauma1-1/+2
2004-05-05gcc can use -mabi=${ABI}, if ABI is set (for example on Irix).jschauma1-1/+8
(Includes ugly hack for ABI-inconsistency. See also PR pkg/22571.)
2004-05-04/usr/bin/cpp on darwin is a wrapper script that forces thedanw1-3/+3
-traditional flag; you need to use "gcc -E" to get sane behavior. Override sys.mk's definition of CPP in defs.Darwin.mk, and don't re-override CPP in gcc.mk if ${OPSYS} == Darwin.
2004-03-30GCC has this annoying behaviour where it advocates in a multi-linejlam1-1/+11
banner the use of "#include" over "#import" when including headers. This generates a _huge_ number of warnings when building practically all Objective-C code where it is convention to use "#import". Suppress the warning if we're building Objective-C code using GCC by passing -Wno-import to the compiler.
2004-03-13Don't save the value of _NEED_NEWER_GCC as it gets a bad value on 1.5.3.jlam1-2/+2
XXX This should be removed after pkgsrc/bootstrap is up and running.
2004-03-13Provide a way to forcibly use the native GCC by setting USE_NATIVE_GCC injlam1-4/+10
a package Makefile. Also modify pkg_admin checks to drop stderr so that errors aren't so verbose.
2004-03-13Note what _CC contains.jlam1-1/+2
2004-03-12Add support for Objective C, and set USE_GCC_SHLIB whenever we're usingjlam1-2/+13
C++, Fortran, or Objective C, as we must link against shared libraries.
2004-03-10set F77 as well as FC.dmcmahill1-1/+2
was: 1% make show-var PKG_STAGE=configure VARNAME=FC g77 2% make show-var PKG_STAGE=configure VARNAME=F77 /usr/pkgsrc-current/math/scilab/work/.gcc/bin/g77 is: 3% make show-var PKG_STAGE=configure VARNAME=FC g77 4% make show-var PKG_STAGE=configure VARNAME=F77 g77 fixes some buildlink spillover noted in the scilab package.
2004-03-05Update _GCC_DIST_VERSION to 3.3.3; noted by Ben Secrest on tech-pkg.wiz1-2/+2
2004-02-20Provide a much more complete list of version number patterns <= 2.95.3.jlam1-2/+2
2004-02-20If for some reason, _GCC_REQD doesn't match any of the version patternjlam1-1/+4
lists, then just assume that we need gcc3. The rest of the code in the file assumes that we either need gcc2 or gcc3, so this provides a fall-through, default value.
2004-02-18* Move pkgsrc/mk/compiler/bsd.compiler.mk to pkgsrc/mk/compiler.mk.jlam1-132/+123
Package Makefiles may now directly include compiler.mk. * Don't include compiler.mk within bsd.prefs.mk any longer. It was only included for the purposes of defining CC_VERSION. Packages that want to test the value of CC_VERSION should now first include "../../mk/compiler.mk". Any GCC_REQD statements in package Makefiles should be set before compiler.mk is included. * Simpllfy pkgsrc/mk/compiler/*.mk files as a result of not needing to be included indirectly by bsd.prefs.mk. We remove the special handling associated with detecting whether the file was included from within bsd.prefs.mk. These files are now much more straightforward to write and understand. * G/C the BSD_PREFS_MK stack mechanism as the only users (compiler/*) no longer need it. * Ensure that directories are prepended to the PATH only from within bsd.pkg.mk.
2004-02-15Create wrappers for the compilers for every language supported by thejlam1-5/+5
compiler set. This will cause the libtool configuration found in several packages to use the correct C++ compiler even though the package doesn't use C++. This was causing bugs when CXXFLAGS contained flags not understood by the system gcc-2.95.3.
2004-02-12Generate a more informative string "CC_VERSION_STRING" that is passed tojlam1-8/+13
ccache as the compiler information to hash.
2004-02-09Update comment to reflect reality.jlam1-2/+2
2004-02-09Reorder some lines so that a default definition for some variables isjlam1-13/+14
present in global context.
2004-02-09Use TOOLS_SHELL since we're creating the shell script at override-toolsjlam1-2/+2
time.
2004-02-08Make those scripts executable.jlam1-1/+2
2004-02-08Use a two-line "exec" shell script instead of a symlink to the real GCC.jlam1-2/+4
This should fix problems with not finding "cc1" or other GCC subprograms.
2004-02-08* Let CC/CXX/CPP/FC always point to the compiler used in the actualjlam1-8/+11
building of software. For packages that use either buildlink2 or buildlink3, this would be the wrapper script in ${BUILDLINK_DIR}. * Garbage-collect _BLNK_WRAP_SETENV.* as those are not needed after the above changes. Configure and make processes will automatically find the right compilers in the PATH. * PKGLIBTOOL and PKGSHLIBTOOL are no longer needed since LIBTOOL and SHLIBTOOL point to the correct libtools regardless of any USE_BUILDLINK[23] definitions.
2004-02-07Symlink the compiler into ${WRKDIR} so that there's a consistent path tojlam1-32/+45
the compiler and that it's behind .tools/bin and .buildlink/bin, regardless of whether or not we're using gcc3-c or not, or whether it's been installed yet in the process of satisfying dependencies, etc.