Commit Graph

366 Commits

Author SHA1 Message Date
christos 0048ede9cd Revert and leave broken. 2016-02-27 23:51:34 +00:00
christos 16fbfcab6b Don't build archive libs with -fPIC breaks static binaries and profilig. 2016-02-27 20:36:17 +00:00
christos 6c0101debe Add NODEBUG 2016-02-21 03:34:27 +00:00
christos dc084e400e Introduce NOPIE and NOCTF so that standalone programs build properly. 2016-01-31 15:30:14 +00:00
uebayasi 45ccdffc42 Revert previous. It was not wrong, but not necessary for everyone.
(If really wanted, *.a generation rule can be easily overriden locally.)
2015-09-08 16:06:42 +00:00
uebayasi 463bd4e74c Order object build alphabetically. 2015-09-07 06:42:07 +00:00
tsutsui e2c773cb5b Revert rev 1.359 which broke libsa builds. PR/50101 2015-07-29 14:35:04 +00:00
joerg a7c9fae5a0 Simplify the build of library archives by no longer doing a topological
sort.
2015-07-20 12:20:26 +00:00
mrg 69443c441c fix MKDEBUG vs parallel builds. split the creation of the final
.so file from the main link of it, and use the main file as the
input for both the .so output and the .so.debug file.  for MKDEBUG
builds we now:

	(a) create the (new) .so.full file
	(d) create the .so.debug file
	(c) create the (installable) .so file

for other builds, we simply use the same rule for (a) to create (c).

this stops the .so.debug rule from modifying the .so rule's target
and leading to mayhem.

see this thread for more details:
   http://mail-index.netbsd.org/tech-toolchain/2015/06/03/msg002616.html
2015-06-04 06:01:24 +00:00
christos acb599fdb6 Strip the debug symbols via a temporary file, atomically replacing the full
random access archive to avoid races.
2015-06-02 23:00:25 +00:00
erh 6830ef879f PR toolchain/9618: add ".d" to MKDEP_SUFFIXES so the depend files are rebuilt
if any of their dependencies (i.e. the files they refer to) are changed.
This allows changes to transitive included headers to be handled properly.
2014-12-01 01:34:30 +00:00
mrg 26f35dd6b6 remove the build support for GCC 4.1, and any hacks i found for it.
there could still be more -- i only looked for lines matching
both "HAVE_GCC" and "4" as words (grep -w.)
2014-06-13 01:17:45 +00:00
pooka d6b3d0da5a allow use with linkers that don't support --warn-shared-textrel
(Solaris, OpenBSD)
2014-04-24 00:14:59 +00:00
matt c5ab5d969b Back changes from 1.349 on since the -Wl,-x bug has been fixed in binutils. 2014-04-11 16:51:43 +00:00
christos 2e21bd91e3 explain what's going on, add another kludge for -g 2014-04-11 15:56:09 +00:00
christos cb8da48e03 Since the objcopy -x removes debugging symbols, delay that if we are building
debugging libraries and do the stripping with the debug symbol separation
step.
2014-04-09 19:23:09 +00:00
christos eec8658016 change -x to OBJCOPYLIBFLAGS like everywhere else. 2014-04-09 16:29:08 +00:00
matt 5cb8c9ae75 Using -Wl,-x breaks build ARM BE8 shared libraries by striping the $a/$d/$t
symbols before the linker can use them.  Instead do ${OBJCOPY} -x ${.TARGET}
afterwards.
2014-04-04 05:10:15 +00:00
christos 199409cf03 let's see if the new dwarf library can handle dwarf 4 2014-03-09 18:00:51 +00:00
christos aca5beab65 If we are compiling with -g and using gcc4.8 and dtrace downgrade
dwarf generation to version 2 for now.
2014-03-02 22:22:05 +00:00
mrg e849bbac94 define EXTERNAL_GCC_SUBDIR based upon HAVE_GCC, for GCC >= 4.5,
and use it in the one place (bsd.lib.mk) it's used in share/mk.
2014-02-26 02:51:02 +00:00
apb 33295e8a08 Let MKARZERO default to the same value as MKREPRO, so callers
can set MKREPRO=yes and automatically get MKARZERO=yes.
2014-01-14 11:31:01 +00:00
matt e3a958c021 Back out change for bsd.lib.mk which skips objcopy -x for BE ARM.
Change OBJCOPYLIBFLAGS to keep $a/$d/$t symbols on BE ARM.
2013-12-16 21:34:16 +00:00
matt a49b15d8d8 Don't strip local symbols for earmv7*eb images since that will break linking. 2013-12-13 02:47:45 +00:00
christos 67ff86e929 change if HAVE_GCC is defined 2013-10-18 16:06:52 +00:00
joerg aa6e9499ca Rename USE_LIBGCC to HAVE_LIBGCC and retry using it as flag on unwind.h. 2013-10-14 16:00:16 +00:00
joerg d06922ddf4 Include compiler-rt and libunwind in libc for Clang/x86 builds. 2013-10-14 01:30:21 +00:00
joerg 36a6d19157 Handle dependency on libstdc++ / libc++ in bsd.lib.mk. 2013-09-12 17:14:20 +00:00
joerg 4d12bfcd15 Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small
vs big PIC mode. Retire -DPIC and -DBIGPIC.
2013-09-12 15:36:14 +00:00
pooka 370de4e409 Enable opt-out from shlib mapfile creation. Not all linkers (namely
the solaris one) support such fancy features.

no default functional change
2013-07-19 11:43:18 +00:00
matt d01d30fa5a When linking shared libraries, produce a map file. 2013-07-16 02:58:19 +00:00
riastradh f85ea5612a Move addition of -g to CSHLIBFLAGS later in bsd.lib.mk.
It is now past any conditionals where its emptiness or nonemptiness can
influence the decision of what objects get built.

Fixes MKDEBUG=yes build on vax (PR 47700).
2013-04-22 22:16:14 +00:00
christos 247331174c Install shlibdir debug links 2013-04-11 01:27:47 +00:00
christos 5fc19dec20 fix mkdebug for private libraries.
while here, centralize the strip variable handling per type of object.
2013-04-04 21:15:15 +00:00
pooka 44e3d14dbc Make "make DBG=-g -O2" for a library once again produce a shared library
with debugging symbols (irregardless of .debug).
2013-03-05 21:16:24 +00:00
nakayama 93c32b3617 Fix copy and paste miss introduced in rev 1.327. 2013-02-13 08:00:47 +00:00
christos 014096fb90 Allow setting _LIB_PREFIX externally. 2013-02-09 17:18:17 +00:00
spz cd9c73575e typo in a MKDEBUGLIB part 2013-02-09 12:17:20 +00:00
matt 4609daf1bc Add missing } 2013-02-08 04:06:25 +00:00
christos 738b87c983 - factor out variables so that the code is more readable, make them conistent
- use _LIB_PREFIX correctly.
2013-02-08 02:30:53 +00:00
christos 1d92830f7c Make the libfoo.so.X.Y.debug files actually contain debug symbols if MKDEBUG. 2013-01-22 20:43:17 +00:00
pooka 813e9ae68d Make it easier build binaries against the host's libs, e.g.
libpthread which might be in /lib/x86_64-linux-gnu/libpthread.so.0
or some other unholy place.
2012-11-13 22:30:38 +00:00
joerg 067600c8cf Revert last, it breaks the tricks xsrc uses. 2012-08-23 21:21:14 +00:00
joerg 8e96262375 Remove SHLIBINSTALLDIR and SHLINKINSTALLLIBDIR. Add rpath entries, if
SHLIBDIR differs from /usr/lib.
2012-08-23 15:45:02 +00:00
christos f788a13164 From pooka: Fix EXTERNAL_TOOLCHAIN compilation where crti/crtn are not in the
same directory as crtbegin
2012-07-19 19:42:45 +00:00
matt 47c982a38d Add support for --combine with gcc. 2012-02-19 23:19:37 +00:00
christos dfa5043919 rename to OBJCOPYLIBFLAGS 2012-01-28 23:13:24 +00:00
christos c37ad7ee66 Provide a way to override the default objcopy flags for library modules. 2012-01-28 21:32:13 +00:00
mrg 4a9d1308c3 obsolete libgcc_pic and friends. all libgcc's are supposed to be pic
for platforms with shlibs already (and are.)

this obsoletes our hacks for the libgcc specs to use libgcc_pic, and
fixes a couple of other issues reported to me directly.
2011-10-07 09:15:21 +00:00
apb c850a5ae67 If the number of entries in CLEANFILES is too large, then the
commands in bsd.clean.mk encounter errors like "exec(/bin/sh)
failed (Argument list too long)".  Avoid that by splitting the
files to clean into several lists using different variable names.

This should fix PR 45397, at least until the number of files
grows much larger.
2011-09-25 11:20:41 +00:00