Commit graph

250 commits

Author SHA1 Message Date
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
joerg
f3c5583abd On AIX don't overwrite the XLC definitions with the platform logic, the
former are already more specific.
2008-10-30 18:56:22 +00:00
sketch
3d4e973b41 Add a bunch of supported options. 2008-06-17 12:58:28 +00:00
joerg
40630f325d Revert rev 1.3 as it breaks e.g. -Wl,--whole-archive. See PR 38476 for
details.
2008-04-21 14:43:50 +00:00
kim
d105f33986 Keep libraries specified as .a files in their original position among
other libraries (specified with -l).

Fixes a linking problem in net-snmp, where the Perl DynaLoader.a library
becomes out-of-order when all -l arguments have been moved to the end of
the command line.
2008-04-20 12:24:21 +00:00
tnn
e6872cea49 Add IRIX command sinks, needed to get rpath fixup when using GCC. 2008-02-19 17:36:51 +00:00
tnn
f0462b82fe Pass gcc's -mabi=* option (used on mips) without warning. 2008-02-19 16:50:11 +00:00
rillig
410affab94 Do not load the $cache file for every argument. Instead, load it once
and then call it as a shell function. Note that the shell function is
not called "cache", since some shells have problems when a function has
the same name as a variable.

This speeds up the wrapper by as little as 75 percent for the final link
command of editors/abiword on SunOS-5.10-sparc (before: 20 seconds,
after: 5 seconds).
2007-11-28 14:45:22 +00:00
rillig
73b5319da9 Oops, don't overflow the terminal. 2007-11-28 13:18:50 +00:00
rillig
b9163bca81 sunpro doesn't need -lstdc++. 2007-11-28 13:03:56 +00:00
rillig
ba3e0729b2 Using a single awk process instead of a pipe of four grep processes
should be both faster and easier to read.
2007-11-28 12:57:46 +00:00
rillig
89870d4887 Sunpro doesn't need -rdynamic, since the linker is sensible by default.
This change also works around shells/scsh's broken check for -rdynamic.
2007-11-19 00:45:49 +00:00
he
4c77b0e4fd Preserve the -Wl,-Bstatic / -Wl,-Bdynamic arguments, but also
duplicate them into the list of libraries.  Someone may want to mix
static and dynamic linking.

Fixes PR#37228, approved by jlam.

jlam says that a better long-term fix would be to ensure that all
the -L specifications come before the -l specifications, instead
of moving all the -l specifications to the end of the command line.
2007-11-08 17:38:17 +00:00
rillig
5fba458aef sunpro doesn't know -ggdb. 2007-11-01 14:31:03 +00:00
is
0596912f74 Handle more variants of the position independent code flag from Solaris.
This is needed for Xaw3d. Fix suggested by joerg@.
2007-10-17 07:30:10 +00:00
martti
bd986edbc7 Remove trailing spaces. 2007-10-09 19:19:08 +00:00