summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.lib.mk
Commit message (Collapse)AuthorAgeFilesLines
* Create a private library directory (LIBPRIVATEDIR) for libraries whichdes2013-09-081-20/+32
| | | | | | | | | | | | | | we don't want to expose but which can't or shouldn't be static. To mark a library as private, define PRIVATELIB in its Makefile. It will be installed in LIBPRIVATEDIR, which is normally /usr/lib/private (or /usr/lib32/private for 32-bit libraries on 64-bit platforms). To indicate that a program or library depends on a private library, define USEPRIVATELIB in its Makefile. The correct version of LIBPRIVATEDIR will be added to its run-time library search path. Approved by: re (blanket)
* Fix install from read-only obj dir when SHLIB_LDSCRIPT is used.jlh2013-06-161-2/+5
| | | | | Reported by: joeld Tested by: joeld
* Add a new knob WITH_DEBUG_FILES to control the building of standaloneemaste2013-06-071-10/+28
| | | | | | | | | | | | | | | | debug files for userland programs and libraries. The "-g" debug flag is automatically applied when WITH_DEBUG_FILES is set. The debug files are now named ${prog}.debug and ${shlib}.debug for consistency with other systems and documentation. In addition they are installed under /usr/lib/debug, to simplify the process of installing them if needed after a crash. Users of bsd.{prog,lib}.mk outside of the base system place the standalone debug files in a .debug subdirectory. GDB automatically searches both of these directories for standalone debug files. Thanks to everyone who contributed changes, review, and testing during development.
* Rework the comment I initially wrote when SHLIB_LDSCRIPT was introduced.jlh2013-05-251-9/+14
| | | | | | The build system is really intricate and I had a hard time to remind the whole picture even when reading my own words. This one will hopefully be better.
* Make sure that ${SHLIB_NAME}.debug and ${SHLIB_NAME}.symbols are alwaysmarkj2013-03-281-5/+3
| | | | | | | deleted by a "make clean" when DEBUG_FLAGS is set. Reported by: gleb Approved by: emaste (co-mentor)
* Fix parallel build race with DEBUG_FLAGSemaste2013-02-201-7/+9
| | | | | Reported by: Jan Beich on freebsd-current Tested by: markj
* Don't declare an dependency on _maninstall when LIBRARIES_ONLY is set.brooks2013-01-241-1/+1
| | | | It doesn't exist.
* Replace all known uses of ln in the build process with appropriatebrooks2013-01-211-3/+3
| | | | | | | | install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK variables. Sponsored by: DARPA, AFRL Reviewed by: ian, ray, rpaulo
* Add a new LIBRARIES_ONLY make variable to disable the build and installbrooks2013-01-171-1/+4
| | | | | | | | | | of files other than the actual libraries. Use LIBRARIES_ONLY to supress the inclusion of files in the lib32 distribution that are duplicates of files in base. Sponsored by: DARPA, AFRL Reviewed by: emaste
* Explicitly specify that the beforelinking target depends on themarkj2012-12-311-10/+13
| | | | | | | | | | | | generated object files, ensuring that the beforelinking recipe won't be executed until compilation has finished. Also define SHLIB_NAME_FULL to denote ${SHLIB_NAME}.debug if DEBUG_FILES is set and ${SHLIB_NAME} otherwise, which helps avoid obfuscating the compilation and linking rules. Reviewed by: emaste Approved by: emaste (co-mentor)
* No reason to install debug data with the schg flagemaste2012-12-181-1/+1
|
* Put shared library debug info into separate .symbols fileemaste2012-12-151-2/+20
| | | | Sponsored by: ADARA Networks
* Minor refactoring prior to .symbols file changesemaste2012-12-141-6/+3
| | | | | | | | - Combine .if x and .if !x using .else - Separate out beforelinking dependency - Add comments to clarify .if nesting Sponsored by: ADARA Networks
* Clean up hardcoded ar(1) flags in the tree to use the global ARFLAGS ineadler2012-12-061-5/+5
| | | | | | | | | | | | share/mk/sys.mk instead. This is part of a medium term project to permit deterministic builds of FreeBSD. Submitted by: Erik Cederstrand <erik@cederstrand.dk> Reviewed by: imp, toolchain@ Approved by: cperciva MFC after: 2 weeks
* Amend r227797 by also passing ${STATIC_CXXFLAGS} for the other supporteddim2012-06-091-1/+1
| | | | | | C++ file extensions. MFC after: 3 days
* Introduce the ${SHLIB_LDSCRIPT} variable to have an ld(1) scriptjlh2012-05-071-2/+25
| | | | | | | | | instead of a symlink for .so files. Reviewed by: kib, kan (previous version), dim Approved by: kib (mentor) Silence from: -hackers@ MFC after: 1 week
* Force linker error when created shared library contains a relocationkib2011-12-061-2/+7
| | | | | | | | | against text. Provide the override switch to turn off the strict behaviour. Apparently, openssl libcrypto needs it due to assembler code not being PIC. Discussed with: bf MFC after: 2 weeks
* - CTF knob is now implemented using common scheme: MK_CTF=yes/no isfjoe2011-11-301-2/+2
| | | | | | | defined based on WITH/WITHOUT_CTF settings, default is WITHOUT_CTF, NO_CTF overrides WITH_CTF (used by Makefile.inc1) - CTFCONVERT_CMD/NORMAL_CTFCONVERT are now defined to empty string if make(1) can handle empty commands
* - fix WITH_CTF when specified in /etc/src.conf [1]fjoe2011-11-291-37/+12
| | | | | | | | | | | | | - CTFCONVERT_CMD=... is a hack (should be defined to empty string instead): make(1) should be taught to ignore empty commands silently in compat mode (as it does in !compat mode, GNU make also silently ignores empty commands) and to skip printing empty commands in !compat mode - config(8) should generate ${NORMAL_CTFCONVERT} invocation without '@': this will allow to simplify kern.pre.mk even more and lessen the number of shell invocations during kernel build when CTF is turned off - WITH_CTF can now be converted to usual MK_CTF=yes/no infrastructure Pointy hat to: fjoe [1]
* Conditionalize ctfconvert/ctfmerge runs on make level (.if/.endif) insteadfjoe2011-11-291-30/+30
| | | | | | of executing a shell on every object or executable/library file. This shaves off more than 30,000 shell invocations during buildworld.
* Add CTF magic to the new .c.o rule.des2011-11-241-0/+3
| | | | MFC after: 3 weeks
* As threatened on -arch, add {SHARED,STATIC}_{C,CXX}FLAGS, which allow ades2011-11-211-4/+10
| | | | | | Makefile to specify different CFLAGS for shared and static libraries. MFC after: 3 weeks
* Remove support for the Intel C Compiler from the build infrastructure.dim2011-04-191-4/+0
| | | | | | This support has not worked for several years, and is not likely to work again, unless Intel decides to release a native FreeBSD version of their compiler. ;)
* Remove libobjc and other Objective-C related components, as these aredim2011-04-171-13/+1
| | | | | | extremely outdated, and not used by anything in the base system. Silence from: current@
* Introduce make variable ACFLAGS used to supply additional flags tokib2011-01-071-4/+5
| | | | cc driver when compiling assembler source file that is preprocessed.
* Check the existence of a 'beforelinking' target and make the resultingrpaulo2010-09-101-0/+4
| | | | | | | program or library depend on that before doing the final linking. This will be needed by DTrace. Sponsored by: The FreeBSD Foundation
* MFtbemd:imp2010-08-231-1/+1
| | | | | Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want to test of all the CPUs of a given family conform.
* For every instance of '.if ${CC} == "foo"' or '.if ${CC} != "foo"' inrpaulo2010-08-171-1/+1
| | | | | | | | | | | | | Makefiles or *.mk files, use ${CC:T:Mfoo} instead, so only the basename of the compiler command (excluding any arguments) is considered. This allows you to use, for example, CC="/nondefault/path/clang -xxx", and still have the various tests in bsd.*.mk identify your compiler as clang correctly. ICC if cases were also changed. Submitted by: Dimitry Andric <dimitry at andric.com>
* Add missing escape characthers.rpaulo2010-07-301-1/+1
| | | | Pointed out by: b.f.
* Fix previous commit: I forgot to include parenthesis.rpaulo2010-07-301-24/+24
| | | | Submitted by: anonymous
* When building WITH_CTF=1, print the ctf executable that's going to berpaulo2010-07-291-12/+36
| | | | | | | run. This makes the 'ctfconvert' and 'ctfmerge' programs show up during a build when compiling a kernel, a library or a program. Sponsored by: The FreeBSD Foundation
* WITH_CTF can now be specified in src.conf (not recommended, therenetchild2010-04-021-36/+17
| | | | | | | | | | | | | | | | | | | | | | are some problems with static executables), make.conf (would also affect ports which do not use GNU make and do not override the compile targets) or in the kernel config (via "makeoptions WITH_CTF=yes"). Additional (related) changes: - propagate WITH_CTF to module builds - do not add -g to the linker flags, it's a noop there anyway (at least according to the man page of ld) - do not add -g to CFLAGS unconditionally we need to have a look if it is really needed (IMO not) or if there is a way to add it only when WITH_CTF is used Note: ctfconvert / ctfmerge lines will not appear in the build output, to protect the innocent (those which do not build with WITH_CTF would see the shell-test and may think WITH_CTF is used). Reviewed by: imp, jhb, scottl (earlier version) Discussed on: arch@
* Introduce two new flags PO_CFLAGS and PO_CXXFLAGS to make it possiblesepotvin2010-01-221-4/+4
| | | | | | to have different flags when building profiled objects. MFC after: 1 month
* Second attempt at eliminating .text relocations in shared librarieskan2009-07-141-2/+2
| | | | | | | | | | | | | | compiled with stack protector. Use libssp_nonshared library to pull __stack_chk_fail_local symbol into each library that needs it instead of pulling it from libc. GCC generates local calls to this function which result in absolute relocations put into position-independent code segment, making dynamic loader do extra work every time given shared library is being relocated and making affected text pages non-shareable. Reviewed by: kib Approved by: re (kib)
* Add support for the Compact C Type (CTF) conversions throughout FreeBSD'sjb2008-05-221-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | system makefiles. Note that the CTF conversion defaults to off. We may choose to change this default later if DTrace proves popular and people are prepared to wear the compilation performance impact of compiling with debug symbols all the time. Setting NO_CTF in the make args or user environment turns off CTF conversion. Even if we choose to default CTF generation to on later, we still need NO_CTF so that the buildworld process can bootstrap the tools without needlessly generating CTF data for temporary tools. Setting WITH_CTF in the make args or user environment (and _NOT_ in /etc/make.conf) is the only way to enable CTF data conversion. Nore that this can't be implemented the same way that the WITH_ and WITHOUT_ stuff is implemented throughout the buildworld because the CTF conversion needs to work when building a simple object without a Makefile, using the default rules in sys.mk. Typing 'make test.o' with no makefile and just a source file test.c should work. Also, typing 'make WITH_CTF=1 test.o without a makefile and just a source file test.c should work and produce an object with a CTF elf section. Typing 'make WITH_CTF=1 CFLAGS=-g test.o' without a makefile and just a source file test.c should produce an object with both a CTF elf section and the debug elf sections. In the FreeBSD build where more .mk files are used than just sys.mk which is included my make by default, the use of DEBUG_FLAGS is the correct way to enable a debug build. The important thing to note here is that it is the DEBUG_FLAGS setting that prevents libraries and programs from being stripped on installation. So, for the addition of CTF data conversion, setting DEBUG_FLAGS to contain -g, without NO_CTF, will cause the ctfconvert and ctfmerge build programs to be executed also with the -g arg so that debug symbols are retained rather than being removed after the CTF data elf section has been added. Add DTrace libraries to the list of libnames.
* Fix spelling mistake in comment.kan2008-04-091-1/+1
|
* - Convert NO_INSTALLLIB option to a new syntax: makefiles shouldru2007-10-201-1/+1
| | | | | | | | | | | test MK_INSTALLLIB, users can set WITHOUT_INSTALLLIB. The old NO_INSTALLLIB is still supported as several makefiles set it. - While here, fix an install when instructed not to install libs (usr.bin/lex/lib/Makefile). PR: bin/114200 Submitted by: Henrik Brix Andersen
* Style: remove redundant parentheses.ru2007-05-211-1/+1
|
* Enable symbol versioning by default. Use WITHOUT_SYMVER to disable it.deischen2007-05-131-1/+1
| | | | | | | | | | Warning, after symbol versioning is enabled, going back is not easy (use WITHOUT_SYMVER at your own risk). Change the default thread library to libthr. There most likely still needs to be a version bump for at least the thread libraries. If necessary, this will happen later.
* Break out Version.map generation code from bsd.lib.mk into akan2007-04-031-33/+2
| | | | | separate bsd.symver.mk file. Include bsd.symver.mk in bsd.lib.mk to maintain the status quo.
* - Don't pass an empty ``NM='' to lorder(1) when NM is unset.ru2006-10-251-3/+17
| | | | | - Don't redundantly use "env". - Protect NM value with quotes, just in case.
* When building WITHOUT_ASSERT_DEBUG, we need to disable -Werror as its easyobrien2006-09-131-0/+1
| | | | to see "warning: unused variable `foo'".
* Add a knob for compiling the tree -DNDEBUG. This turns off all theimp2006-09-111-0/+4
| | | | | | | | asserts and makes binaries smaller. The binaries also become repeatable again. As it was, without this md5's of binaries built with different paths differed. # Where do I document this?
* Pass whatever the value of NM down to lorder. This allows one toimp2006-08-251-3/+3
| | | | | | | override NM in Makefiles when, for example, cross compiling and have that value be used by lorder. NM normally isn't defined, so we pass a null value to lorder. lorder says 'NM=${NM-nm}' which causes it to pickup the default value.
* Add proper dependencies for the version map, and make sure 'make clean'des2006-03-231-1/+4
| | | | | | removes it if it was generated. Reviewed by: ru
* Convert NO_PROFILE and NO_LIB32 to new style.ru2006-03-181-3/+3
|
* Reimplementation of world/kernel build options. For details, see:ru2006-03-171-5/+5
| | | | | | | | http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html The src.conf(5) manpage is to follow in a few days. Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine)
* Teach bsd.lib.mk to auto generate a version map file based ondeischen2006-03-161-0/+40
| | | | | | | | | | | a set of symbol definitions (VERSION_DEF) and symbol mappings (SYMBOL_MAPS). Add an awk script to generate the version map. Suggested by: ru Helped by: ru Reviewed by: ru
* Handle NO_INCS solely inside bsd.incs.mk.ru2006-02-031-2/+0
|
* Add the NO_INCS knob to bsd.prog.mk and bsd.lib.mk to not includeru2005-11-191-0/+2
| | | | | | | | | | bsd.incs.mk, and use it when installing 32-bit compat libraries on amd64. This causes it to *not* overwrite native headers with i386 versions, which was the case with <fenv.h> and <vgl.h>. PR: amd64/83806 Prodded by: bde MFC after: 1 week
OpenPOWER on IntegriCloud