Commit Graph

207 Commits

Author SHA1 Message Date
dsl b90eeeef12 Report when we link a program into xxx.ro (before being crunched) 2005-04-09 13:00:53 +00:00
he 8e8728c45c Introduce PAM_STATIC_LDADD and PAM_STATIC_DPADD. When compiling
with MKPIC=no, possibly because the target does not support shared
libraries, these include libraries required to resolve all symbols
which end up referenced from PAM-using applications.  The libraries
presently required are -lcrypt, -lrpcsvc and -lutil.

Add use of these variables which are currently set up to use PAM,
so that they compile when MKPIC=no.

Also, in the telnetd case, reorder the order of the libraries, so
that libtelnet.a comes before -ltermcap and -lutil, again to fix
link error when MKPIC=no.

Discussed with thorpej and christos.
2005-03-04 20:41:08 +00:00
christos 907dfbe7a9 Add libradius 2005-02-20 00:35:02 +00:00
lukem aa8cb2a456 If RESCUEDIR is defined, automatically add that to CPPFLAGS 2005-01-12 00:32:59 +00:00
lukem 7af4913b70 Implement <bsd.prog.mk> vars:
LIBASN1 LIBBSDMALLOC LIBG2C LIBPAM LIBSSH
2005-01-08 09:53:38 +00:00
lukem a606b4af8b Revert most of previous, and move the LIB<libname>?= assignments
back to bsd.prog.mk from bsd.own.mk.

pkgsrc uses <bsd.own.mk>, and setting LIB<libname> in it causes
problems with various package builds.
This should fix PR #26542 submitted by Jim Bernard.

(I'll be implementing the DPADD for shared libraries in a different
manner that generally won't depend upon ${LIB<libname>}.)
2004-08-04 05:32:47 +00:00
lukem d57516168e Move the LIB<libname>?= assignments from bsd.prog.mk to bsd.own.mk so
that they may be used by non PROGs (e.g., LIBs).

Improve some comments.
2004-07-30 04:18:48 +00:00
lukem 4fbb0461b9 Be consistent in handling YHEADER, similar to Christos' fix in bsd.lib.mk 1.253 2004-06-10 00:29:58 +00:00
ross b95d15a372 If you add a library, you need to define its DPADD symbol here.
Add LIBMAGIC.
2004-05-21 21:13:57 +00:00
skrll b263dbdd73 Be more gcc like in the way we deal with libgcc so that sh3/hppa millicode
and exception handling have a chance of working properly.

        - creates libgcc, libgcc_eh and libgcc_s

        - updates LIBGCC_SPEC to use them appropriately.

          There's a hack in here at the moment with respect to libgcc_so in that it
          is preferable to link against libgcc_so will only when -shared-libgcc is
          specified (the c++ frontend does this automatically.) Configurations where
          LINK_EH_SPEC is defined already do this. The gcc configuration for
          NetBSD/alpha and another NetBSD platform (I forget which) actually define
          LINK_EH_SPEC probably by accident rather than design.

        - updates share/mk to use the compiler's knowledge of what needs linking into
          libraries and executables. This removes an hppa hack.

        - updates the sets for the newly created libgcc* files.

	- support for linking against the _pg version of libgcc has been removed.
2004-02-15 19:52:27 +00:00
lukem 84a4748659 Cosmetically tweak how .PHONY is used by (generally) providing it as a source,
instead of using it as a target with all the rules as its sources.
2004-01-29 01:48:45 +00:00
lukem af85ccad70 Replace
:M-[IDU]*
with
	:C/-([IDU])[  ]*/-\1/Wg:M-[IDU]*
so that arguments with whitespace after them work correctly.
Resolves [toolchain/18248] from Andrew White at Motorola.

Be consisent in this syntax; previously we'd sometimes we'd just have :M-[ID]*
which would ignore -Ufoo ...

(This needs :C///W support in make(1) that Simon Gerraty added for me :)
2004-01-27 03:31:48 +00:00
simonb 842124b391 crt0.o lives in /usr/lib even on a.out. 2004-01-23 05:09:58 +00:00
lukem abdaf2f3be simplify with _MKTARGET_LINK 2003-11-16 14:09:00 +00:00
dsl 433a97cc58 Set MKDEP_SUFFIXES to get additional targets in .depend instead of using
sed in .afterdepend.  I don't think .afterdepend is used anywhere any more.
2003-11-11 11:43:45 +00:00
lukem 130ab7336b Rework how MAKEVERBOSE operates:
*	Don't bother prefixing commands with a line of  ${_MKCMD}\
	and instead rely upon "make -s".  This is less intrusive on
	all the Makefiles than the former.  Idea from David Laight.

    *	Rename the variables use to print messages.  The scheme now is:
	    _MKMSG_FOO		Run  _MKMSG 'foo'
	    _MKTARGET_FOO	Run  _MKMSG_FOO ${.TARGET}
	From discussion with Alistair Crooks.
2003-10-21 10:01:19 +00:00
lukem 4ccb31e74a Provide _MKMSG{BUILD,CREATE,COMPILE,FORMAT,INSTALL,LINK,LEX,YACC} to display
${_MKMSG} "  ...  {$.TARGET}"  and use appropriately.

Provide _MKMSGLINK.m to provide "link" message by itself (without ${.TARGET})

Replace _MKSHCMD with _MKSHECHO
2003-10-19 03:00:55 +00:00
lukem 03b6213598 Implement MAKEVERBOSE to control how "verbose" the standard make(1) rules are.
Supported values:
    0	Minimal output ("quiet")
    1	Describe what is occurring
    2	Describe what is occurring and echo the actual command ("verbose")
	This is the default, and is equivalent to the previous behaviour.
2003-10-18 15:33:59 +00:00
lukem 0f9e6cf359 Add LIBSTDCXX (for usr/lib/libstdc++.a).
Sync LIB* documentation with reality.
2003-09-29 01:06:37 +00:00
martin 57b44eed3f Drop explicit medlow model and default to -O2 for sparc64. 2003-09-19 16:32:10 +00:00
lukem e71fc1cc14 Check ${SHLIBDIR} against "/usr/lib" instead of ${LIBDIR} when determining
if we need to add stuff (usually "/lib") to the rpath-link path before
"/usr/lib".  Otherwise, this barfs if LIBDIR != /usr/lib or /lib, and
we're cross-building (e.g., in src/x11)
2003-09-14 22:36:55 +00:00
erh 552531a249 Also support per-program LDFLAGS and LDSTATIC. 2003-09-13 03:44:20 +00:00
erh 056a75c41e Create a way to add additional flags to COPTS, CPPFLAGS, CXXFLAGS and LDADD
for particular libraries or programs by specifying the additions in mk.conf
instead of needing to go edit individual Makefiles.
2003-09-13 02:52:05 +00:00
lukem 7be275a0ed add infrastructure to support reach-over builds of xsrc 2003-09-12 07:44:10 +00:00
dsl a33723f245 Add a ${PROG}.ro target that does an 'ld -r' of the program object files.
Allows a much simplified build of 'crunched' binaries since crunchgen can
build prog.ro instead of having to deretmine the names of all the .o files.
2003-08-22 19:17:00 +00:00
lukem a93ea220fc Rework how dependency generation is performed:
* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
  This is a change of behaviour.  If a Makefile wants the clean semantics
  it must specifically append to CLEANFILES.
  Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
  that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d  depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS


Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".
2003-08-01 17:03:41 +00:00
lukem e1ba5f323e simplify the ${PROG}: target to reduce duplication between the DESTDIR
and !DESTDIR cases...
2003-08-01 13:08:35 +00:00
lukem a504cd2911 bsd.dep.mk: add a dependency for *.d on ${SRCS} ${DPSRCS}. this should fix
some build problems where DPSRCS contains .h files that need to exist to
build the .d file.

document that bsd.dep.mk should be included after anything that might
update SRCS or DPSRCS so that the above works correctly, and actually
ensure this is the case.
2003-07-31 13:47:32 +00:00
lukem 6874712934 Don't need -R/usr/lib; it will be searched at the end by ld.elf_so anyway.
Noted by matt green <mrg@>
2003-07-31 06:31:38 +00:00
lukem 5aab21f43a be consistent when adding *.y and *.l to DPSRCS 2003-07-28 23:54:24 +00:00
lukem cc73d5607b replace MKCXXSUPCXX(!=no) with USE_LIBSTDCXX(==no) 2003-07-28 08:53:53 +00:00
lukem 0b96e890ae Change defined(CXX_SUPCXX) to MKCXXSUPCXX != "no".
Clarify that command-line overrides of the MKxxx variables should be
done via the environment rather than make(1) command-line variable
assignment, since the latter doesn't actually work as intended.
2003-07-28 07:03:43 +00:00
mrg 96d9a01177 introduce a new $CPPFLAG_ISYSTEMXX that is used to reference c++ system
includes.  for GCC3, set this to -I instead of -isystem.

XXX this should really be either not required or a -isystem-cxx, but for
now this is required to build libstdc++-v3, which otherwise complains
heavily about STL headers not being C code(!)
2003-07-27 14:49:22 +00:00
mrg badf45a38b add a new bsd.own.mk variable: CXX_SUPCXX. from bsd.README:
+ CXX_SUPCXX    If defined, the support libraries needed for this C++ program
+               are set to `-lsupc++ -lm', rather than `-lstdc++ -lm'.
2003-07-26 14:58:10 +00:00
lukem b6bdfc6774 Consistently support the different C++ file extensions: .cc .cpp .cxx .C
Noted by Andrew White in PR toolchain/18246
2003-07-20 17:01:58 +00:00
lukem f134f3dc38 Add MKUNPRIVED; if not no has the same semantics as if UNPRIVED was defined.
Replace defined(UNPRIVED) tests with ${MKUNPRIVED} != "no"

Add MKUPDATE; if not no has the same semantics as if UPDATE was defined.
Replace defined(UPDATE) tests with ${MKUPDATE} != "no"

Improve documentation for these and other make flags.
2003-07-18 08:26:01 +00:00
itojun e26b0e0cf5 stop installing install libtelnet. build under lib/libtelnet and reference
it from usr.bin/telnet and libexec/telnetd.
(reason for separate build: compiler flags)
2003-07-16 05:42:01 +00:00
drochner 03caf45b83 For consistency, use "-R" instead of "-Wl,-rpath" to pass
a runtime search path to the linker.
2003-06-27 17:30:16 +00:00
itojun ded3919389 define LIBEVENT 2003-06-13 04:04:18 +00:00
msaitoh 535480c5be catch signal 1,2,3,13 and 15 to clean /tmp/_dependXXX 2003-06-11 04:56:58 +00:00
thorpej 000836e000 If EXTERNAL_TOOLCHAIN is defined, allow the compiler to define the
location of crt{begin,end}{,S}.o and libgcc.a.  Encapsulate all of
this logic into the new bsd.gcc.mk, and use it in bsd.prog.mk and
bsd.lib.mk.
2003-05-31 20:33:15 +00:00
lukem 03a26b2c80 make this a no-op if HOSTPROG is defined 2003-05-18 07:36:23 +00:00
thorpej 44d9add676 If MACHINE_ARCH is powerpc and we HAVE_GCC3, add crtsaveres.o to the
endfile spec.
2003-03-30 00:35:07 +00:00
uwe c18a5386dc Typo in comment. 2003-02-22 04:46:08 +00:00
thorpej 14dfb2cab0 Add LIBPTHREAD, LIBPTHREAD_DB, and LIBRT. 2003-01-24 02:06:37 +00:00
thorpej 6dba3a7439 Split crtbegin/crtend into crti/crtbegin/crtend/crtn. NetBSD-specific
things like the .note.netbsd.ident section are provided by crti/crtn.
crti/crtn also provide the _init() and _fini() routines.

crtbegin/crtend now only provide support for ctors/dtors.  This paves
the way to using the "crtstuff" provided with GCC (when we upgrade to
GCC 3.3), which provides, among other things, much better C++/Java
exception handling.
2002-11-22 06:44:56 +00:00
itohy cbb1f0fb0f MKDYNAMICROOT for a.out 2002-11-12 14:33:48 +00:00
perry 8885724457 Pass 1 of SYSPKG changes to automatically add tags=pkgname_pkg to METALOG.
Not quite ready for prime time yet.
2002-10-22 18:48:27 +00:00
thorpej 09a0767aa9 Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.

The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.

This is done by decoupling where a shlib is installed from how it
is located.  Two new variables, SHLIBINSTALLDIR and SHLINKINSTALLDIR,
contain the former information, and key off MKDYNAMICROOT only.  SHLIBDIR
and SHLINKDIR contain the latter, and key off MKDYNAMICROOT and BINDIR.

The SHLIBINSTALLDIR, SHLIBDIR, _LIBSODIR, SHLINKINSTALLDIR, and
SHLINKDIR parameters are moved to a new <bsd.shlib.mk>; see bsd.README
for usage details.
2002-09-27 21:37:50 +00:00
itojun d24389cf67 MDC2 is a patented algorithm; don't ship it in default libcrypto.
MKCRYPTO_MDC2 will build a separate library, libcrypto_mdc2.
2002-09-26 13:05:54 +00:00