Commit graph

265 commits

Author SHA1 Message Date
jperkin
1a2757e82f Introduce _USE_CWRAPPERS logic to ensure consistency, USE_CWRAPPERS could
differ between a package and user setting, resulting in incorrect WRAPPER_*
values being set from wrapper-defs.mk.
2015-04-29 14:23:23 +00:00
jperkin
c79e6c9aef Move cwrappers WRAPPER_DIR and WRAPPER_BINDIR to wrapper-defs.mk, it is
included by bsd.prefs.mk so we need to ensure consistency.
2015-04-28 21:15:01 +00:00
jperkin
d040a0e7c5 Split cwrappers from legacy wrappers. We no longer generate the legacy
wrappers when USE_CWRAPPERS is enabled, saving a reasonable amount of
I/O during builds, mostly due to avoiding the transform/untransform sed
file generations.

WRAPPER_DIR and WRAPPER_BINDIR are used by various packages to override
or point to specific wrappers, and these now point to the cwrappers
directory when enabled, removing the need for CWRAPPERS_BIN_DIR
duplication and fixing packages which previously were using legacy
wrappers by accident.

A number of targets are now duplicated between bsd.wrapper.mk and
cwrappers.mk, the intention being that the legacy wrappers will be
deprecated once cwrappers is verified on all supported platforms.  If
that turns out to take longer than expected, we will probably want to
introduce a wrapper.mk to abstract them away before loading the
appropriate back-end.
2015-04-27 19:59:07 +00:00
jperkin
6c2c920fd0 Remove ECHO_WRAPPER_MSG and just use ECHO_BUILDLINK_MSG, which was set
to the same value anyway.  Also removes a comment from 2005 which was
possibly wrong at the time it was committed, given the same construct
has been used in bsd.buildlink3.mk unchanged since 2004.
2015-04-27 19:38:03 +00:00
tnn
b01007a2ee revert rev. 1.7. Although it should be correct in theory it interacts
with the build of some packages in subtle ways, and needs more testing.
2015-04-26 07:59:58 +00:00
wiz
e427a26a70 Fix typo in comment. 2015-04-25 22:26:41 +00:00
tnn
771073a47d If we have -Wl,--whole-archive -lfoo -lbar -Wl,--no-whole-archive
surrounding a list of static libraries, we must preserve that order so the
effect of --whole-archive is as intended by the package.
cwrappers does this correctly but classic wrappers didn't.
2015-04-25 22:15:38 +00:00
wiz
627d407a75 Remove pkg_views support, second part: infrastructure. 2014-12-30 15:13:19 +00:00
joerg
37084183c6 Separate dependency from nada-rule. 2014-11-25 18:27:49 +00:00
joerg
516b42831c Add cwrappers glue as developed during Google's Summer of Code 2007. 2014-11-24 00:32:31 +00:00
jperkin
ee4800c69c Replace calls to cat(1) with echo(1) which is highly likely to be a shell
builtin.  This significantly reduces the number of exec's required during
the 'wrapper' phase and brings the execution time down accordingly.
2014-09-02 14:23:00 +00:00
uebayasi
36b92c2e0c Variable override is confusing. 2014-03-06 10:19:43 +00:00
uebayasi
117cbdcd8a Wrap not only ld but also ar and ranlib. 2014-03-06 10:15:54 +00:00
jperkin
6792284e7a Remove special handling of -v in the wrappers.
This was originally introduced to work around some behaviour in the
libtool build, however these days it is actively harmful for a number of
packages, where removing additional arguments when -v is present on the
command line can break ABI detection (notably in CMake packages).

Instead, filter out any references to BUILDLINK_DIR from the libtool
scripts, as that should do the same job.

Retain the ability to run the 'scan' wrapper script, as it can be useful
in certain cases, and is required to support the scan-libtool script
anyway.
2014-02-26 10:40:46 +00:00
tron
c05e16109a Don't try to convert the SunStudio option "-mt". There is no GCC option
which is accepted by both the GCC bundled with Solaris 10 and the more
modern GCC versions availabe in "pkgsrc". Handling of POSIX thread
related options should be left to pkgsrc anyway.

Fix based on a suggestion by Richard Palo.
2013-12-31 13:56:35 +00:00
riastradh
ed8be66086 Use --sysroot in cpp/gcc/gxx cross-compiler wrappers.
Now that NetBSD supports --sysroot we don't need to mess with the
partial measures of -nostdinc, -isystem, &c.

ok agc
2013-05-09 23:35:29 +00:00
uebayasi
86615a3bb5 Fix a harmless typo. 2013-04-21 03:51:27 +00:00
jperkin
883524d430 Create a wrapper for gfortran. 2013-03-01 13:27:38 +00:00
jperkin
b7642344f0 Pass through -specs, as used by devel/binutils/override-as.mk 2012-07-23 11:58:41 +00:00
marino
1a21fb3999 compiler.mk/gcc.mk: Add support for USE_LANGUAGES+= ada
All recent packages featuring Ada code have a hard dependency on the
lang/gnat-aux compiler package.  The valid values for USE_LANGUAGES
are c, c99, c++, fortran, fortran77, java, objc, so specifying a
specific compiler was necessary up into now.

One problem with lang/gnat-aux is that it is installed at ${LOCALBASE}
where the lang/gccXX compilers are installed at ${LOCALBASE}/gccXX.
The latter compilers have no possibility of sharing conflicting files
unlike lang/gnat-aux.  Rather than fundamentally update the GCC 4.6-based
lang/gnat-aux to avoid these conflicts, a new Ada-capable compiler
based on GCC 4.7 was created with the intent of being supported by
mk/compiler.mk and mk/compiler/gcc.mk.

The Ada packages will be effectively migrated from lang/gnat-aux to the
new lang/gcc-aux compiler, but lang/gcc-aux will remain as a standalone
package as it is the only GCC 4.6-based compiler that builds on
DragonFly and serves it as a world and kernel compile option.

In addition to the current language wrappers, lang/gcc-aux adds
wrappers for "ada" (unique to gcc-aux, hardlinked to gcc driver),
and the gnat, gnatmake, gnatbind, gnatlink, gnatchop, gnatprep,
and gnatls programs.  Supporting all of these allows the wrapper
system to be used with Ada packages; currently wrappers are mostly
disabled on them.

The lang/gcc47 implicitly adds support for the "objc-c++" language by
adding it to the USE_LANGUAGES list, but it wasn't really supported.
An attempt was made to better support objc-c++, but this new enumeration
probably still needs work or needs to be removed completely.

Logic for Ada support:
1) All lang/gccXX compilers have version numbers ranging from 2.8.1 to 9.
2) lang/gcc-aux uses the release date as its version number in the form of
   YYYYMMDD with a minimum value of 20120614, so there is no version
   overlap.
3) When at least one element of USE_LANGUAGES is "ada", the value of
   20120614 is added to the set of GCC_REQD which selects lang/gcc-aux.
4) The _NEED_NEWER_GCC check is disabled.  It fails and isn't relevant;
   unless a package sets GCC_REQD over 20120614, the only way to select
   lang/gcc-aux is to specify the Ada language and only one compiler
   known to gcc.mk can support it.
2012-07-08 19:57:10 +00:00
obache
9d0abaeb6c Ignore SunPRO -errwarn flags to prevent it from being recognized as a entry
point option for `ld'.
2012-06-08 11:39:44 +00:00
wiz
fd2c8c7186 Fix typo in comment. 2012-04-13 06:36:08 +00:00
sbd
bcac6ae79b Treat the '--as-needed' and '--no-as-needed' arguments to ld as if
thay are librarys so that they still surround the given library.
WARNING: this may not work if the wrapper reorders librarys.
2012-04-13 03:11:13 +00:00
he
6e628b356e Rewrite any -R<dir> into -Wl,-R<dir>. -R is the old form of -Wl,-R,
but our gcc re-orders them so that all -R args come at the front
of the "ld" invocation.  This messes up the relative search order,
and is at least partly responsible for "the pixman problem"
experienced on (at least) NetBSD 5.1.  This is as close as a general
fix as I can think of, and should fix PR#46130, although it possibly
doesn't fix every instance of this more general problem.
2012-03-07 12:55:53 +00:00
shattered
cf49cc2189 Transform -ggdb<level> to -g, too. 2012-02-07 09:42:05 +00:00
bsiegert
3039ebe47a Make transform-gcc recognize some the strange and disturbing things which
are in the default CFLAGS on MirBSD.
2012-02-06 13:03:55 +00:00
fhajny
4a88e01fad Revert runaway commit 2012-02-06 12:49:38 +00:00
fhajny
bd77327b68 Added devel/ruby-kgio, www/ruby-raindrops and www/ruby-unicorn 2012-02-06 12:41:28 +00:00
shattered
823a2e9139 gcc also knows -mschedule=* 2012-01-21 12:05:03 +00:00
obache
44bc871ebd Add support of C++ crossbuild with g++, based on CC with gcc. 2011-08-04 13:32:05 +00:00
agc
e81f515156 Add support for MirBSD to pkgsrc. Patches from Benny Siegert and
Thorsten Glaser.
2011-01-23 19:07:24 +00:00
obache
9a6ed5c66f Force to use symbolic link for wrapper if WRAPPER_USE_SYMLINK is defined.
Workaround for missing hard link support on Haiku, PR#43398.
2010-08-16 10:03:44 +00:00
tron
c08d676be1 Make wrapper generation code work properly if there is a directory with
a whitespace in the command search path.
2009-11-23 00:25:13 +00:00
joerg
e44e745bc5 Recognize -m32. Change reundant -kPIC to -kpic to match the set. 2009-08-15 13:36:48 +00:00
sno
5dfc240bfc wrap some more gcc flags to suitable xlc flags 2009-06-11 10:38:28 +00:00
sno
fc5ee2d351 shell code is not C ... 2009-06-02 17:39:28 +00:00
joerg
f0a005f2df Avoid one fork per wrapper call if no cleanup is necessary and debugging
is disabled.  In that case, the post processing is doing nothing anyway.
2009-05-30 19:18:01 +00:00
joerg
62df2b30e0 Require exact match for --wrappee-name option, no leading or trailing
content.  This option is used by libtool only and that uses the correct
exact argument.
2009-05-30 17:48:20 +00:00
sno
1633b578b2 add some argument wrappers after studying xlc manpage 2009-05-30 16:08:03 +00:00
tron
76a8021ba5 Allow to set the "bourne" shell used for buildlink3 wrappers per platform.
Set it to "/bin/ksh" under Mac OS X which should reduce package build times
by more than 20%.
2009-05-06 10:28:01 +00:00
joerg
a70755c941 Fix cut & paste errors. From Jens Rehsack. 2009-01-15 16:55:33 +00:00
joerg
cb1ac20e13 Further refine AIX support. From Jens Rehsack. 2009-01-09 11:46:34 +00:00
joerg
258aaa98a1 Also wrap the cpp command like cc for AIX/XLC. 2008-12-29 20:47:17 +00:00
joerg
709d52f492 Improve AIX/XLC support:
- provide cpp wrapper using cc -E
- provide c++_r wrapper working like c++
- provide -rpath handling for cc
- fix some debug messages to provide the correct script name
2008-12-29 16:53:06 +00:00
joerg
932fd9ecda Emulate -rpath argument of GCC and xlC on AIX, it works like the
corresponding linker argument.
2008-12-29 11:25:39 +00:00
joerg
71914235a2 Skip -q64. From Jens Rehsack. 2008-12-01 20:40:37 +00:00
joerg
8be94cdec0 Explicitly pass down -brtl for the linker, not the compiler. From Jens
Rehsack.
2008-11-27 18:01:17 +00:00
joerg
b6cae7ec3e Don't use the CC wrapper for ld on AIX with XLC. From Jens Rehsack. 2008-11-27 18:00:06 +00:00
joerg
07e7458998 Improve AIX/XLC support based on discussions with Jens Rehsack:
- Add cc_r/xlc_r wrapper using the same rules as xlc itself.
  It is used for example by Perl.
- Improve the RPATH emulation:
  - Always set -blibpath, use /usr/lib:/lib as default
  - If -blibpath is exlicitly given, add to the default
  - Additionally append any -Wl,-rpath given.
2008-11-14 14:04:12 +00:00
joerg
c6b8125c9c Merge aix-xlc block into the xlc block and distinguish AIX and Darwin.
The PKG_FAIL_REASON isn't executed by default, no idea why, but this
makes it a bit cleaner why the compiler wrapper will fail and fixes the
more important AIX case.
2008-11-06 21:34:16 +00:00