Commit graph

62 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
5add53c2b4 GCC_REQD should be appended to, not set. 2004-02-05 04:12:28 +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
jlam
4f87d407ea Reset the values of _GCC_PREFIX and _GCC_SUBPREFIX from the value of
_GCC_ARCHDIR, since _GCC_ARCHDIR is something that GCC actually tells us
and can be relied upon to accurately give the installed location of GCC.
2004-02-05 01:28:20 +00:00
jlam
fa2f433053 Missing a " 2004-02-04 23:25:13 +00:00
jlam
2727a4aeb9 case branches are separated by ;; 2004-02-04 23:24:36 +00:00
jlam
3e017ffa31 Try to avoid "/" as the _GCC_SUBPREFIX. 2004-02-04 23:10:19 +00:00
jlam
1769209623 Make it more apparent where certain "not_found" values are being set for
debugging purposes.
2004-02-04 22:33:18 +00:00
jlam
79cd30027c Avoid a non-zero exit value in a != variable definition. 2004-02-04 00:32:16 +00:00
jlam
095af71baa Define _GCC_PKG unconditionally since its value is determined by another
global variable, and so that we can reuse it in other places in gcc.mk.
2004-02-04 00:27:24 +00:00
jlam
dbbec50a86 Try to be smarter about detecting whether a cc in the PATH is actually
GCC.  If it's found under ${LOCALBASE}, then assume that it came from a
package and proactively require at least that version of GCC so that the
correct package dependencies are added.
2004-02-04 00:11:07 +00:00
jlam
55f66ddd70 Reorder checks when setting _GCC_SUBPREFIX so that we always search for
the installed package first if _USE_PKGSRC_GCC is "yes".
2004-02-03 22:35:05 +00:00
jlam
69e47a8c52 Remove not_found checks now that we pre-filter them out when setting
LDFLAGS.
2004-02-03 22:32:22 +00:00
jlam
5bc1349574 Do previous in a different way to avoid make errors. 2004-02-03 22:31:33 +00:00
jlam
49df0ac7ed Don't add to LDFLAGS if the directories are "not_found". 2004-02-03 21:56:40 +00:00
jlam
7c469d9583 ":H", not ":T", is the correct make variable modifier to get everything
except the final component of a path.
2004-02-03 21:51:45 +00:00
jlam
9a4609c2b9 Reorder sections a bit so that related sections are together. 2004-02-03 21:48:14 +00:00
jlam
2a172b2e99 Whitespace nit. 2004-02-03 21:30:26 +00:00
jlam
5a6dccc212 Fix a pervasive cut-and-paste bug: change a = back into a +=. Noted by
David Brownlee in private email.
2004-02-03 20:38:39 +00:00
jlam
0c2dd883d9 Check whether _NEED_GCC[23] is yes/no rather than just defined, since
that's the way that its set.  Also, remove _IGNORE_GCC3C and just overload
_IGNORE_GCC to note that we're building the GCC C compiler and that if
we're building something that it depends on, then avoid a dependency loop.
2004-02-03 05:14:03 +00:00
jlam
fa20e41206 Move the _COMPILER_LD_FLAG setting to somehere global as it applies to all
GCCs.
2004-02-03 04:09:27 +00:00
jlam
c09381462f Avoid using "type" to find the absolute path to the compiler. We find it
ourselves now using some make variable magic.
2004-02-03 03:47:45 +00:00
jlam
148b4f7b03 Whitespace fixes. 2004-02-02 12:45:08 +00:00