Commit graph

95 commits

Author SHA1 Message Date
jlam
6bb0a14e5a Check that MABIFLAG is defined before checking that it's non-empty. This
avoids breakage if MABIFLAG isn't defined.
2004-05-17 05:33:08 +00:00
jschauma
6f7a52cca0 Allow use of 32bit gcc compiled from pkgsrc on 64bit Irix for a default
ABI of 64.
2004-05-17 03:12:46 +00:00
jschauma
10bc0c9d01 If ABI is set, LDFLAGS also needs the proper flag. 2004-05-12 21:31:50 +00:00
jschauma
b02a7b431a Finally set _COMPILER_LD_FLAG.
(Not having this set caused various rpath related problems, as the compiler
was passed ' -rpath,/path' instead of '-Wl,-rpath,/path', leading to
a rpath of ",path", which of course wouldn't work.)
2004-05-06 14:25:02 +00:00
jschauma
44f433156b gcc can use -mabi=${ABI}, if ABI is set (for example on Irix).
(Includes ugly hack for ABI-inconsistency.  See also PR pkg/22571.)
2004-05-05 03:05:41 +00:00
danw
04e1556286 /usr/bin/cpp on darwin is a wrapper script that forces the
-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-05-04 00:11:23 +00:00
jlam
29df39d6b5 GCC has this annoying behaviour where it advocates in a multi-line
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-30 21:39:24 +00:00
jlam
a9d431f730 Also accept DISTCC_VERBOSE in /etc/mk.conf to allow for easier debugging. 2004-03-17 06:07:06 +00:00
jlam
250b02f294 Allow DISTCC_HOSTS and DISTCC_SSH to be set in /etc/mk.conf to modify the
behaviour of distcc when used in the compiler framework.
2004-03-17 05:23:05 +00:00
jlam
fc5641ff84 Don't save the value of _NEED_NEWER_GCC as it gets a bad value on 1.5.3.
XXX This should be removed after pkgsrc/bootstrap is up and running.
2004-03-13 20:02:52 +00:00
jlam
9014a4ee8f Provide a way to forcibly use the native GCC by setting USE_NATIVE_GCC in
a package Makefile.  Also modify pkg_admin checks to drop stderr so that
errors aren't so verbose.
2004-03-13 19:08:37 +00:00
jlam
bd781e9285 Note what _CC contains. 2004-03-13 17:52:24 +00:00
jlam
a9cc44f9bd Add support for Objective C, and set USE_GCC_SHLIB whenever we're using
C++, Fortran, or Objective C, as we must link against shared libraries.
2004-03-12 06:09:12 +00:00
dmcmahill
c2df7b0cb4 set F77 as well as FC.
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-10 05:13:38 +00:00
wiz
2c8703a248 Update _GCC_DIST_VERSION to 3.3.3; noted by Ben Secrest on tech-pkg. 2004-03-05 14:36:34 +00:00
jlam
911e6a0991 Allow setting CCACHE_DIR in the environment or in /etc/mk.conf. 2004-02-22 12:31:10 +00:00
jlam
2db74558c6 Use BUILD_ENV instead of just {CONFIGURE,MAKE}_ENV to pass CCACHE_HASHCC
to ccache.  This now correctly passes CCACHE_HASHCC to ccache if the
package has a custom do-build target that invokes ${CC} directly.
2004-02-21 12:31:38 +00:00
jlam
8132b7353c Provide a much more complete list of version number patterns <= 2.95.3. 2004-02-20 07:18:19 +00:00
jlam
75bd3d729a If for some reason, _GCC_REQD doesn't match any of the version pattern
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-20 07:10:06 +00:00
jlam
c40ee95964 * Move pkgsrc/mk/compiler/bsd.compiler.mk to pkgsrc/mk/compiler.mk.
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-18 13:32:38 +00:00
jlam
455aa176d8 Initial support for the MIPSpro ucode compilers found on IRIX 5.3. The
ucode compilers only support building the "o32" ABI.
2004-02-18 11:18:42 +00:00
jlam
78080df597 Allow overriding CC_VERSION_STRING and CC_VERSION. 2004-02-18 11:13:54 +00:00
jlam
f9efcd5148 Create wrappers for the compilers for every language supported by the
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-15 13:34:33 +00:00
jlam
ae51b23ccf Remove CPP setting for now until I find a better way to wrap these. This
backs out the changes in rev. 1.24 of mk/compiler.mk, but I will restore
the behaviour elsewhere.
2004-02-12 21:37:08 +00:00
jlam
cbea8f59e4 Prevent non-zero exit status when calling the compiler to print out the
version string.
2004-02-12 11:50:46 +00:00
jlam
3d0294d0d4 Generate a more informative string "CC_VERSION_STRING" that is passed to
ccache as the compiler information to hash.
2004-02-12 08:54:48 +00:00
jlam
e17f6d7638 Give a better pseudo CC_VERSION for the SunPro C compiler. 2004-02-10 00:37:53 +00:00
jlam
cb345dd94c Apparently, GCC isn't the only compiler that tries to be clever by checking
with what path it was invoked.  Copy the driver script trick from gcc.mk
into mipspro.mk and sunpro.mk.
2004-02-09 05:50:03 +00:00
jlam
dc8414a9a5 Update comment to reflect reality. 2004-02-09 05:45:57 +00:00
jlam
548aca7853 Reorder some lines so that a default definition for some variables is
present in global context.
2004-02-09 05:22:43 +00:00
jlam
2fd59f45ed Don't have recursive variable definitions. 2004-02-09 01:29:29 +00:00
jlam
27c20963da Use TOOLS_SHELL since we're creating the shell script at override-tools
time.
2004-02-09 00:37:32 +00:00
jlam
3125014a8f Make those scripts executable. 2004-02-08 03:34:20 +00:00
jlam
f57168db2f Use a two-line "exec" shell script instead of a symlink to the real GCC.
This should fix problems with not finding "cc1" or other GCC subprograms.
2004-02-08 03:29:16 +00:00
jlam
3f0c4ee09a * Let CC/CXX/CPP/FC always point to the compiler used in the actual
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-08 02:59:14 +00:00
jlam
7c268604ca Symlink the compiler into ${WRKDIR} so that there's a consistent path to
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.
2004-02-07 02:58:10 +00:00
jlam
eae918c163 I missed changing a defined(_NEED_GCC3) into a yes/no check. 2004-02-06 20:15:49 +00:00
jlam
3737a66b9d Whitespace nit. 2004-02-06 19:16:37 +00:00
jlam
c49973f61a If we're passing through MAKEFLAGS variables whose values may contain
spaces, use the :Q modifier instead of double-quoting the value.  This
fixes breakage when executing the just-in-time su targetes.
2004-02-06 18:45:02 +00:00
jlam
e54ce0c467 Remove a debugging statement. 2004-02-06 04:38:10 +00:00
jlam
d72bb0e381 Hiding the PATH from certain phases of the build only accidentally worked
due to a type on gcc.mk that causes the ${_GCC_PREFIX}/bin to always be
prepended to the PATH.  The problem that was hiding was "make" resolving
to ${TOOLS_DIR}/bin/make if the package used GNU make, which broke
building since the package Makefile is a BSD Makefile and we passed
PATH to some phases of the build.  Fix this by expanding MAKE to the
full path to ${MAKE} in bsd.prefs.mk.  We also garbage collect the now
useless checks for PHASES_AFTER_BUILDLINK that cluttered the PREPEND_PATH
code.
2004-02-06 04:37:02 +00:00
jlam
bed8d4d73e We only prepend a directory to the PATH if we haven't already done so
(by checking PREPEND_PATH) and only for those phases of the build that
care about the PATH (buildlink or later).  We also pass the PATH to
those same phases of the build so that executing ${CC} will work correctly
from custom {pre,do,post}-* targets that occur at buildlink time or
later.
2004-02-06 03:04:50 +00:00
jlam
352e29f3c1 Get the version string out of the MIPSpro compiler in the right way. 2004-02-05 22:05:42 +00:00
jlam
4cd560ed49 Note that the variables (USE_LANGUAGES, GCC_REQD, PKGSRC_COMPILER) should
be defined in or before the first inclusion of bsd.prefs.mk.
2004-02-05 21:26:16 +00:00
jlam
5add53c2b4 GCC_REQD should be appended to, not set. 2004-02-05 04:12:28 +00:00
jlam
fee0a809ce Simpilfy the test for whether we're inside bsd.prefs.mk. 2004-02-05 03:39:17 +00:00
jlam
c2d20bedad Allow bsd.compiler.mk to be included by both bsd.prefs.mk and bsd.pkg.mk.
Any additions to DEPENDS/BUILD_DEPENDS or inclusions of buildlink[23].mk
files are deferred till bsd.compiler.mk is included by bsd.pkg.mk.  We
allow bsd.compiler.mk to be included by bsd.prefs.mk solely for the purpose
of setting CC_VERSION properly for use by package Makefiles.

There is the surprising behaviour that CC_VERSION won't necessarily have
the correct value at all times until after "make extract" has been
completed (dependencies are installed before "make extract"), so package
Makefile writers should keep that in mind.  Just to note that this is
_existing_ behaviour that's preserved by these changes.
2004-02-05 03:35:20 +00:00
jlam
1b5d9d2251 Don't compute the CC_VERSION unless ${CC} exists. 2004-02-05 01:57:38 +00:00
jlam
e14bd051b8 _CC is really meant to be evaluated from the value of CC _as found_ in
that particular location, so set it using :=
2004-02-05 01:50:55 +00:00
jlam
998d6a0b9c _GCC_PREFIX and _GCC_SUBPREFIX are expected to end in "/" if we're using
the pkgsrc gcc.
2004-02-05 01:42:05 +00:00