Commit Graph

1890 Commits

Author SHA1 Message Date
mrg d5ae492949 find the kmodule ldscript in the source tree again.
should fix a build issue reported by jmcneill.
2008-10-14 18:31:42 +00:00
apb 4c441fdf08 Use "?=", not "=", to set default values for the TOOL_* variables
added in the previous commit.
2008-10-14 07:24:34 +00:00
apb 59b0ced7eb Add missing TOOL_* variables to bsd.sys.mk and document them in
bsd.README.  Previously, several of these variables were present in
bsd.own.mk but not in bsd.sys.mk or bsd.README.
2008-10-13 18:24:21 +00:00
apb bdcb00dc94 Remove references to TOOL_BEBOXELF2PEF and TOOL_BEBOXMKBOOTIMAGE,
which were obsoleted in May 2008.
2008-10-13 18:23:47 +00:00
apb bbaac8b3bb In bsd.sys.mk and bsd.own.mk, sort lists of TOOL_* variables.
In bsd.README, document all TOOL_* variables that are set in bsd.sys.mk.

There are several TOOL_* variables that are set in bsd.own.mk, but not
set in bsd.sys.mk and not documented in bsd.README.
2008-10-13 15:29:22 +00:00
mrg 8b825b9876 add X11SRCDIR.xf86-video-r128 2008-10-12 23:11:25 +00:00
mrg 86340158d0 - install ldscripts on sparc64
- move ldscripts to /usr/libdata/ldscripts
2008-10-12 23:00:53 +00:00
apb 1d782af00e Remove the definition of HOST_SED. HOST_SED was previously used only in
tools/atf-compile, which has now been adjusted to use TOOL_SED.
2008-10-05 20:20:55 +00:00
apb 2d81fb994e Document TOOL_SED, which has been defined in bsd.sys.mk for more than
two years.
2008-10-05 20:17:16 +00:00
joerg 39741d2848 Hook up libfetch and pkg_install update. 2008-10-02 17:54:51 +00:00
apb 520cbbf81f Build strfile both as a host tool and as an installed program:
* in games/fortune/strfile/Makefile, build strfile as a
  regular program instead of as a host tool;
* add tools/strfile directory to build strfile as a host tool;
* in tools/Makefile, add strfile to SUBDIR list;
* in BSD.*.mk, define TOOL_STRFILE variable;
* in games/fortune/datfiles/Makefile, use TOOL_STRFILE when creating
  databases at build time;
* in distrib/sets/lists/games/mi, mention usr/games/strfile.
2008-09-26 18:23:09 +00:00
mrg 39434e7052 add X11SRCDIR.xf86-video-nvxbox 2008-09-21 02:12:25 +00:00
mrg 533a79fd9d add X11SRCDIR.xf86-video-mach64 2008-09-21 01:46:40 +00:00
christos 99ca374317 support per file lex and yacc prefixes. 2008-09-19 22:54:55 +00:00
cube e8a45a91fe Play it safe and change the sed script so that -E isn't needed. 2008-09-15 18:21:48 +00:00
rtr ec7c336281 replace XTHREAD_CFLAGS with _REENTRANT instead of _POSIX_THREAD_SAFE_FUNCTIONS
as is done in pkgsrc.
2008-09-15 08:05:19 +00:00
cube cbc74b28eb Make sure pkgconfig files we install have RPATH directives.
${TOOL_SED} -E is authorized, right?  Right?
2008-09-15 02:37:54 +00:00
cube b11433d4c1 Add logic to install pkgconfig files from X.Org sources. Initial idea from
Tyler Retzlaff.

No, this is not code I am going to be proud of.  Meanwhile, anyone is
welcome to work on a mknative-xorg script and make sure that outputs across
all archs are consistent, and use it to generate a bunch of other stuff such
as the Imake config file and so on.  That will do for now though.
2008-09-13 04:28:37 +00:00
joerg 5af38558ac Add MKSTRIPIDENT to remove the RCS IDs from binary programs and shared
libraries for space-constraint systems. The description is based on the
feedback of hubertf@, the logic on input from lukem@

This obsoletes the removal of LIBC_SCCS and SYSLIBC_SCCS for libc builds.
2008-09-09 11:54:19 +00:00
kent 9c8aa6615e Remove -Wno-pointer-sign and -ffreestanding from CXXFLAGS. g++
doesn't support for them.
2008-09-07 15:54:52 +00:00
lukem 935f649468 Define __appmansuffix__=1 in the man page cpp(1) translation. 2008-09-07 14:29:38 +00:00
rtr a51f302f6a add XLOCALE.DEFINES for locale path defs, easier to manage them here
than deep in the reachover.
2008-09-07 13:10:22 +00:00
mrg b2e7ac5a11 add X11SRCDIR.xinput 2008-09-06 05:27:46 +00:00
lukem df53be0111 refer to mk.conf(5) in a couple of places 2008-09-05 22:26:28 +00:00
christos 320991dd0c remove NVI; it is the default now. 2008-08-31 05:40:15 +00:00
lukem e425ce2906 Enable MKHTML by default; we now install the HTML version of the man
pages as well as the source & catman versions.
Add "htmlinstall" to default MANINSTALL, so MKHTML will operate correctly.
2008-08-31 01:21:41 +00:00
mrg 668eaf0f7f add X11SRCDIR.xkeyboard-config 2008-08-30 09:13:35 +00:00
lukem 3c0dc4341a Use ${MANDIR} instead of /usr/share/man as part of the default ${HTMLDIR} 2008-08-29 04:52:44 +00:00
lukem 5efefa3743 Force a failure if both MKX11 and MKXORG are set to != "no". 2008-08-28 23:32:51 +00:00
mrg 710bacd4ef add a bunch of more variable documentation wrt xorg 2008-08-28 07:53:53 +00:00
mrg 8f32579127 - s/X11R6/X11/ in a couple of comments.
- set X11ROOTDIR?=/usr/X11R7 if MKXORG != "no".
- MKXORG does not need two default values.
2008-08-28 07:53:34 +00:00
lukem d6e6997551 Improve support for MKXORG!=no to enable builds into external/mit/xorg.
This will be mutually exclusive to MKX11!=no.
2008-08-28 07:21:49 +00:00
mrg 1bae5733ee xorg server is version 1.4.2 2008-08-28 07:18:19 +00:00
mrg 6f734b8231 update a comment example 2008-08-28 07:17:06 +00:00
rtr 44c3e543f8 use ${X11USRLIBDIR} instead of hard-coded /usr/X11R6/lib when building
${LIB.foo} vars
2008-08-27 08:22:20 +00:00
lukem 4f84d43824 Rework MKHTML (HTML manual pages) implementation to behave like
the manpages and catpages builds, with similar target names (etc).
2008-08-27 02:28:34 +00:00
lukem 9614d5d9bd Fix problem I introduced in rev 1.231 on 2008/08/25 where ${_PROGLDOPTS}
and -L${_GCC_LIBGCCDIR} were appearing in the link line before ${LDADD},
so -L${DESTDIR}/lib and -L${DESTDIR}/usr/lib were being used before
local -L library paths.
Fixes ntpd/ntpdate failure noticed by Valeriy E. Ushakov <uwe@NetBSD.org>
2008-08-27 01:15:22 +00:00
lukem c7dbe9e5b7 expand on the behaviour of MKDEBUGLIB 2008-08-27 00:16:09 +00:00
lukem a6de443cac Default MKHTML to no, as per bsd.README.
(The default and documentation may change to yes in the near future,
as the build infrastructure for HTML man pages is fixed.)
2008-08-26 23:47:14 +00:00
lukem aa9ba46b38 Change the message when creating BUILDSYMLINKS from "create" to "symlink".
(Arguably more meaningful)
2008-08-25 08:11:04 +00:00
lukem 6cedae1847 Always link with: -Wl,-rpath-link,${DESTDIR}/usr/lib -L${DESTDIR}/usr/lib
Fixes problem with MKDYNAMICROOT=no triggered by libraries that depend
on other libraries.
Related to PR 33503.

Clean up setting of _CCLINK to always add the appropriate -B options.

Simplify the link rule for a program.
2008-08-25 08:03:14 +00:00
gmcgarry ce206e318d Honour HAVE_PCC 2008-08-24 06:27:00 +00:00
christos 4b67625a5e fix debugging library build. 2008-08-13 16:36:15 +00:00
lukem 01ca4a276a Fix installed symlinks for LIBISMODULE=yes.
Further fixes to support for SHLIB_MAJOR set without SHLIB_MINOR.
2008-08-10 11:06:43 +00:00
lukem e24bdb26eb When building a .so, don't require the library to have a minor version.
Prevents a "stat: Too many levels of symlinks" build error.
2008-08-10 10:42:01 +00:00
lukem b88ccbbf16 Implement LIBISMODULE:
If not "no", install as ${LIB}.so (without the "lib" prefix),
	and act as "MKDEBUGLIB=no MKLINT=no MKPICINSTALL=no
	MKPROFILE=no MKSTATICLIB=no".
	Default: no
2008-08-10 09:25:04 +00:00
joerg 9259cd05bd When compiling C++ sources and BUILDSEED is set, pass down
-frandom-seed with a reduced version of .ALLSRC and .TARGET
as argument.  This allows bit-identical builds of C++ files.
2008-08-04 16:02:25 +00:00
mrg f0245e7653 add X11SRCDIR.* for xf86-{video,input}*. 2008-08-02 06:59:24 +00:00
mrg f4766ba44d add X11FLAGS.DIX and X11INCS.DIX for use with Xorg.
fix the version to 1.4.2.
2008-08-02 04:36:12 +00:00
mrg bf84f2d816 add X11SRCDIR.pixman 2008-08-02 04:35:41 +00:00
pooka 4b68af9947 Prevent amd64 compiler flag -mcmodel=kernel for rump kernel code.
This allows to compile rump libraries as shared libraries also on mad64.

Problem spotted by Greg Oster.  I guess his build broke or something ...
2008-07-29 20:18:25 +00:00
pooka bdf6e0b034 Install rump libraries and utilities to the base system and remove the
private non-installed build infrastructure from sys/rump.

breakdown of commit:
  * install relevant headers into /usr/include/rump
  * build sys/rump/librump/rumpuser and sys/rump/librump/rumpkern
    from src/lib and install as librumpuser and librump, respectively
    + this retains the ability to test a librump build with just the
      kernel sources at hand
  * move sys/rump/fs/lib/libukfs and sys/rump/fs/lib/libp2k to src/lib
    for general consumption, they are not kernel-space dwellers anyway
  * build and install sys/rump/fs/lib/lib$fs as librumpfs_$fs
  * add chapter 3 manual pages for rump, rumpuser, ukfs and p2k
  * build and install userspace kernel file system daemons if MKPUFFS=yes
    is spexified
  * retire fsconsole for now, it will make a comeback with an actually
    implemented version shortly
2008-07-29 13:17:40 +00:00
mrg def7d522c2 begin to add support for cross-built Xorg:
- add MKXORG
- default to DRI-on for Xorg
- add paths for 192 Xorg packages that will exist in
  xsrc/external/mit/<package>/dist
- add some more X11FLAGS.* variables if MKXORG.

this is somewhat based on the xorg work rtr@ did a couple of years ago.

XXX: seriously need to fix the XORG_RELEASE value, it is still set to
XXX: 6.8.1 from when rtr was working on this.
2008-07-29 04:40:14 +00:00
christos ee372c7d11 Disable PIE for kernel builds. Some architectures pass -mcmodel to gcc and
this is incompatible with PIE. And we don't really want pic objects in the
kernel
2008-07-23 23:21:56 +00:00
dogcow ce62ce6187 add MKNVI to vivified MK* variables. (HI, DYOUNG!) 2008-07-23 00:45:39 +00:00
dyoung 6b01f88146 Document MKNVI. 2008-07-22 21:09:52 +00:00
wiz e5ad05320e Consistent spelling. 2008-07-22 08:01:54 +00:00
lukem 63c843cdd1 Rewrite the introduction.
NOGCCERROR also prevents -Wa,--fatal-warnings.
2008-07-21 23:39:55 +00:00
lukem 9ceb85ca59 If WARNS>0 and !defined(NOGCCERROR), add
-Wa,--fatal-warnings
to CFLAGS to set assembler warnings to be fatal.
(Done via CFLAGS instead of AFLAGS so that all assembling, not just
that of .S/.s files, uses the option.)
2008-07-21 23:30:48 +00:00
lukem 3035c3a0cc Document NOGCCERROR.
Improve PAXCTL_FLAGS & WARNS.
2008-07-21 23:23:42 +00:00
lukem 314fddd639 AFLAGS is actually options to ${CC} (not ${AS}) when compiling .s/.S files.
(For gcc, this means that flags to as(1) need to be passed as -Wa,flag)
2008-07-21 12:12:57 +00:00
gmcgarry eedccd9862 Add and document knobs to turn off building ATF and libm complex support.
Also add knobs for PCC which parallel GCC ones.
2008-07-12 12:15:43 +00:00
dyoung eeabda7de2 Fix two bugs to make MKMODULAR=yes builds will work again, for the
first time.

share/mk/bsd.kmodule.mk: only set _INST_DIRS if KMODULEDIR is not
    set.  That we we avoid installing some bogus directories in
    the DESTDIR and in $DESTDIR/METALOG.

tests/modules/k_helper/Makefile: add missing .include <bsd.own.mk>,
    and set the KMODULEDIR that the author seems to have intended.
2008-05-31 19:58:35 +00:00
lukem bb2d78e387 add LIBLDAR_R (for completeness) 2008-05-28 11:23:26 +00:00
wiz d07f1e1727 Sort variables. 2008-05-23 13:06:40 +00:00
lukem 050d9aaef4 Add MKLDAP, USE_LDAP, LIBLBER, LIBLDAP 2008-05-22 13:40:30 +00:00
he 775e29197c Do ${INSTALL_DIR} on all the intermediate directory levels from
the top of the tree down to where the kernel modules are installed,
so that unprivileged builds have a chance at working again.

Note, to use this fix in a tree where you've already hit on this
problem, you need to manually remove the kernel modules in
$DESTDIR/stand/<arch/, and then reinstall them from sys/modules/.
2008-05-21 19:56:30 +00:00
jmcneill 70932cf82f Don't echo 'hello sh' when installing modules :-) 2008-05-21 03:48:42 +00:00
ad 14cd43625f Install kernel modules into the proper locations, taking machine and
kernel version into account.
2008-05-20 19:01:10 +00:00
ad 575673e1ce fno-zero-initialized-in-bss no longer required. 2008-05-20 12:18:45 +00:00
ad 0b78a6ea64 Use an ldscript to merge kernel modules' .bss sections into .data. Passing
-fno-common -fno-zero-initialized-in-bss to gcc does not work, and objcopy
refuses to expand the bss section.
2008-05-20 12:17:48 +00:00
ad 64be07548a Kill the tramp stuff, since it can be handled with lkm_map. 2008-05-20 12:08:05 +00:00
skrll 1f81e345f4 Add TOOL_HP700MKBOOT 2008-05-10 19:01:14 +00:00
uwe 5e2fa55b72 For sh3 set default DBG to "-Os -freorder-blocks" which is almost like -O2
but without -falign-* that is too zealous for low-memory sh3 machines.
2008-05-06 22:19:11 +00:00
tsutsui 34dd728d42 There is only one more file which requires HACKS for m68000,
so handle it in each Makefile rather than sys.mk.

These ICEs might be related with GCC Bugzilla Bug 32424
which is not resolved yet even in the upstream.
2008-05-04 15:37:19 +00:00
ad 19913f0560 Pass -d to the linker, to assign space to common objects up front. The kernel
linker isn't smart enough to do that...
2008-05-03 15:48:15 +00:00
lukem 66176dfdff Rename MKPRIVATELIB to LIBISPRIVATE, to make it clearer that this is
a variable that is used by in-tree Makefiles to control behaviour.
(MKsomevar variables are generally intended to be controlled by the end-user)
2008-05-03 14:48:30 +00:00
lukem b552ef70c2 Provide a "lint" target that will lint all the sources, even if MKLINT=no.
(MKLINT=no still prevents installation of the lint libraries).
Explictly disable some library variations if MKPRIVATELIB=yes.
2008-05-03 14:36:06 +00:00
ad 7d1f779aa2 Build and install modules into /kernel/modules. Each module gets a
directory for properties, blobs, etc. It's not fixed in stone and
can easily be changed if there are issues with the location/layout.
2008-05-02 23:12:00 +00:00
ad 3ba209837a - Add a bsd.kmodule.mk to build new style modules.
- Set the file suffix to .kmod
2008-05-02 14:20:50 +00:00
lukem d77bf7654f Explicitly set MKLINT=no if MKLINKLIB==no, rather than just acting that way. 2008-05-02 11:45:19 +00:00
jmmv 01ab96ad80 Add support for a TESTS_C variable to make use of the new C-only binding
that comes with atf-0.5.  Also fix linkage of C++ tests.
2008-05-01 15:36:36 +00:00
garbled c3408ed04a Convert prep to use the new unified mkbootimage rather than it's own. This
mkbootimage can be shared by prep, rs6000, and bebox.

TODO: Convert bebox to use this.  Needs someone to test.
2008-04-30 21:15:33 +00:00
simonb 71a4269193 Use -nodefaultlibs instead of -nostdlib when linking libc and libgcc*
so that we still link in the crt* start/end files.
Explicitly link libc against gcc_pic, since -nodefaultlibs undoes this.

Fixes problems where shared libraries don't get init/fini sections,
most easily noticable with pthreads programs not working.

Approved by: skrll
Thanks: bjs, mrg, icb peanut gallery.
2008-04-29 07:48:31 +00:00
christos a9587bb896 now that gcc adds -lc, reverse the logic and explain. 2008-04-27 23:48:10 +00:00
tsutsui c007028e0b Enable gcc optimization on m68000 (sun2) again with minimum hacks.
gcc -O0 generates a bit fat binaries.
2008-04-27 03:06:46 +00:00
christos f369b6c6cb Exempt gcc libraries from linking against libc. 2008-04-26 22:28:13 +00:00
christos fe6aa33a8e deal with modules that don't define lib. 2008-04-26 21:26:03 +00:00
christos 9d8a22cf84 make all shared libraries depend on libc. 2008-04-26 20:03:44 +00:00
tsutsui c81a918994 Redo a change in rev 1.160 with more proper way:
> Don't make linker warnings fatal on linking static libs since
> there is no proper way to avoid "FOO is a patented algorithm" warnings.

Ok'ed by christos@ and dogcow@ on tech-toolchain, and
tested build.sh build for sun2, news68k, alpha and newsmips.
2008-04-22 12:47:59 +00:00
tsutsui a91b6f6d11 Backout previous for now. We have to rethink dependency for MKPIC and LDSTATIC.
Pointed out by dogcow@.
2008-04-15 00:08:05 +00:00
tsutsui 6dadfb80d4 Don't make linker warnings fatal on linking static libs since
there is no proper way to avoid "FOO is a patented algorithm" warnings.
Ok'ed by christos@ on tech-toolchain.
2008-04-14 13:41:43 +00:00
tsutsui 4c7d97cc4a Add libhx509 to PAM_STATIC_LDADD which is required by libkrb5. 2008-04-10 13:52:45 +00:00
lukem 30883326ec Change USE_SKEY default to "no"; we have had USE_PAM=yes as the default
for a long time, and there's no point having custom S/Key support in the
applications given that pam_skey.so is now in /etc/pam.d/*
2008-03-31 02:42:27 +00:00
dholland f47dfee9a0 Correct documentation of default value of FILESMODE.
PR bin/38059 from Aleksey Cheusov.
2008-03-28 06:04:40 +00:00
lukem f0b277f256 Make it easier to find various MK* and USE_* variable definitions
by expanding their names in the for loops.

Inspired by a recent commit, which made sense to me based on the
number of times I've had to redo a search without the leading MK|USE_
within this file just to find the default...
2008-03-24 05:00:31 +00:00
mlelstv b0f88a0388 Import Heimdal-1.1 2008-03-22 08:36:48 +00:00
uwe 08aeb1f9ef Use angle brackets in UUDECODE_FILES_RENAME_<fn> as we do for other
file-specific variables.  Start description on new line.

While here correct s/<fn>>/<fn>./ typo in a nearby item.
2008-03-11 13:33:16 +00:00
dholland 2d8b0e31c6 Adjust the loop that handles NOMAN and friends so grepping for NOMAN
actually finds it. Also note that it only works if set before
bsd.own.mk is included.

Otherwise, grep NOMAN /usr/share/mk/*.mk comes up empty, and since
naively setting it may not work, one can easily draw wrong
conclusions.
2008-03-10 01:18:29 +00:00
phx ae0b13c01b Make XFree86 compile for ofppc.
Approved by garbled.
2008-03-08 10:37:48 +00:00
lukem ba936e32d4 Set linker warnings to be fatal if ${WARNS} > 0. 2008-03-03 06:33:17 +00:00
jmmv f51186f572 Fix build of tests when USETOOLS=no. Reported by veego@ in current-users
and notified to me by martin@.
2008-03-02 11:31:42 +00:00
skrll 55edbc2411 Add hppa to the list of platforms that need help with branches.
Sort the list while I'm here.
2008-03-01 20:29:43 +00:00
lukem 77b570b56b Use "GCC" instead of "gcc".
Highlight that MKGCCCMDS still does build the GCC libraries.
Suggested by Lloyd Parkes on tech-toolchain@
2008-02-27 00:36:00 +00:00
jmmv 1abe396003 Allow Makefiles to skip the installation of an Atffile by defining NOATFFILE.
This is to be able to get the definition of TESTSBASE, which maybe should be
part of bsd.own.mk...
2008-02-10 12:28:54 +00:00
jmmv 62b4c6bc5c Add a MKMODULAR build-time option, defaulting to no, to enable the new
kernel modules framework.
2008-02-09 19:31:36 +00:00
mrg ecc90aa046 make all sun2 use -O0 and move most of the hacks out into just 3 files. 2008-02-09 02:37:21 +00:00
drochner 992ef89b0e include bsd.init.mk so that eg USETOOLS is available to
client Makefiles, approved by jmmv
2008-02-05 17:50:47 +00:00
jmmv 1561f4867f Rebuild shell-based tests if the atf-compile host tool has changed. The
contents of the generated scripts may change (as will happen with ATF 0.4),
so this dependency is important to have.  Dunno how to deal with the
non-tools case other than adding an entry in UPDATING, but if you are not
using tools, you can expect all kinds of breakage.
2008-02-04 14:15:57 +00:00
nakayama c3420b91a3 Follow the recent rpcgen(1) change.
The environment variable of the C preprocessor has replaced to RPCGEN_CPP.
2008-01-29 14:14:54 +00:00
ad bbc79e58a6 Pull in my modules code for review/test/hacking. 2008-01-16 12:34:50 +00:00
skrll 21f4fe85eb Enable gdb on hppa. 2008-01-10 22:21:43 +00:00
simonb d8de5b102b Remove support for NetBSD/pc532. 2008-01-09 11:25:58 +00:00
ad 0e3fd5532f Record LKM entry point in the ELF file header. 2008-01-04 14:54:29 +00:00
christos 7af2df4395 add MKPIE 2007-12-28 21:35:45 +00:00
jmmv 0287baacad Make the clean target work when OBJS is set but PROG is not, as happens
for example in gnu/lib/crtstuff4.  Reported by drochner@.
2007-12-26 22:52:10 +00:00
lukem e226e0f887 It's "its" for possessive, not "it's". 2007-12-11 14:06:04 +00:00
jmmv 1a8b914c59 No need to set a value for TESTSDIR any more as this is explicitly set
wherever it is needed.
2007-11-21 15:40:09 +00:00
jmmv ac0bd149f2 Fix typo that prevented MKDEBUG builds to work. Found by drochner@. 2007-11-13 13:57:53 +00:00
jmmv dd2f8250cc Add the bsd.test.mk file
This file simplifies the build of test programs, either written in C++
or in sh.  It hides the internals of atf, e.g. by silently linking
against -latf or calling atf-compile.

It also takes care of installing an Atffile for each new test directory.
2007-11-12 15:05:15 +00:00
jmmv 12408017c4 Add the ability to build multiple programs from a single directory
This adds support for a new set of variables, PROGS and PROGS_CXX, that
allow the developer to build multiple different programs from a single
source directory.
2007-11-12 15:04:35 +00:00
jmmv 2965cbca98 Add the atf host tools
This adds reachover Makefiles to build the atf tools required during a
cross-build.
2007-11-12 14:54:43 +00:00
tls b21c402a7b Remove MKPRIVATELIB from BIND libraries; move library reachover
directories and Makefiles from src/usr.sbin/bind to src/lib; make
BIND libraries build shared.  Saves about 1MB-1.5MB per installed
executable, about 5MB for a base+etc minimal installation of NetBSD.
2007-11-04 23:28:16 +00:00
ad 431267f955 Add USE_JEMALLOC. 2007-10-06 00:21:44 +00:00
christos 9ba5d03c10 Enable text relocation warnings. 2007-09-15 14:36:14 +00:00
hira 02972af57d Use /libexec/ld.elf_so instead of /usr/libexec/ld.elf_so for the
programs which are located in /libexec.
2007-08-29 21:34:17 +00:00
lukem aae621fdad Support MAKEVERBOSE when installing APPDEFS. 2007-08-06 04:25:57 +00:00
pooka c5653da5a1 install bsd.klinks.mk 2007-08-05 21:50:32 +00:00
pooka 9af4ce05d6 Split the part of bsd.kmod.mk which creates links to kernel header
directories into a separate module, bsd.klinks.mk.
2007-08-05 21:43:24 +00:00
joerg 577a8c7029 Add build glue for libarchive and update the various sets. 2007-07-29 17:06:00 +00:00
joerg dbfc63fcce Rename nbinstall to ${MACHINE_GNU_PLATFORM}-install as it calls the
target strip. Don't pass down strip as it is not needed any longer.
2007-07-03 16:29:24 +00:00
tron 14f772ea69 Don't use alloca(3) inside the X11 libraries if we compile with
stack protection. XFree86 can now be buildt fine with "USE_SSP=yes".
2007-06-07 11:49:17 +00:00
rillig f1ed085bcf Explained the word "new" in the first paragraph. 2007-06-06 06:18:39 +00:00
uwe 00fa1e6950 Stack protector codegen bug on sh3 has been fixed, so drop sh3 from
the list of platforms where we disable ssp.
2007-06-03 21:07:33 +00:00
christos 380cacfb28 we can now compile libc with _FORTIFY_SOURCE 2007-06-03 17:42:18 +00:00
uwe 7243a4e86c Fix inverted comparison ${MACHINE_ARCH} != "hppa" when checking for
ssp.  (hi^2 tls!)
2007-05-31 00:17:32 +00:00
uwe c7bdc65e61 Use matching open and close parens.
Why make doesn't complain about $(foo} ?
2007-05-30 22:54:12 +00:00
tls 14aa3a04d9 Fix typo, and eliminate mention of libssp since it's gone.
Move -D_FORTIFY_SOURCE to CPPFLAGS from COPTS.
2007-05-30 21:27:54 +00:00
tls dc99372be9 Match usage of FORTIFY_SOURCE on other platforms by not requiring special
include path: the normal header files now include the "SSP" ones (which one
should note are not really named right: SSP and FORTIFY_SOURCE are independent
features).

Disable USE_SSP on targets where the compiler doesn't support it at all
(mips, alpha) or it's known broken (sh3).  But enable FORTIFY_SOURCE,
without SSP, on those platforms -- tested on mipsel.
2007-05-30 21:14:35 +00:00
tls a83c0ab035 mipsel || mipseb, not mipsel || mipsel 2007-05-30 14:21:31 +00:00
tls 2368dc663d Move FORTIFY_SOURCE implementation from the somewhat ill-named "libssp"
(what other systems keep in libssp, we already have in libc) into libc
to match what other systems with FORTIFY_SOURCE do.  Goodbye, libssp
dependency in libraries and executables.  Discussed with christos and
mrg; Christos will merge the headers to get us the rest of the way to a
FORTIFY_SOURCE implementation that works as others' code expects.
2007-05-30 01:13:14 +00:00
tls 6c43b583d4 Sigh, revert previous and fix right: we don't have MACHINE_CPU in bsd.sys.mk. 2007-05-29 21:24:57 +00:00
tls e5545ad98b MACHINE_ARCH -> MACHINE_CPU so excluding mips from SSP/FORT works right. 2007-05-29 21:09:18 +00:00
tls 64e3562f4f Fix two bugs reported by Simon Burge: 1) USE_FORT and USE_SSP should be
disabled on platforms where GCC doesn't support -fstack-protector.  2) The
libssl Makefile had a hard-coded USE_FORT=yes.
2007-05-29 13:55:31 +00:00
tls 1e799aacf7 Sigh. Fix USE_FORT: do not use /usr/include/ssp from *host* system. 2007-05-29 04:56:34 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
tls d307e49627 Add -D_FORTIFY_SOURCE=2 where it can safely/sanely be used if building
with USE_SSP: not in the kernel, and not in libssp itself.
2007-05-22 23:58:54 +00:00
matt 8655342068 -O1 on vax isn't quite enough, add -fgcse -fstrength-reduce -fgcse-after-reload
too.  We can build again.
2007-04-15 22:53:08 +00:00
matt 286b959060 For now, make vax default to -O not -O2 2007-04-14 18:39:46 +00:00
scw 5764a76889 Remove support for NetBSD/{,evb}sh5. 2007-04-08 09:35:21 +00:00
matt 87e605a5fe Don't test machine_arch for m68k and m68000, just test machine_cpu for
m68k.  Turn on PIC/PICLIB for VAX.
2007-03-31 05:58:30 +00:00
tsutsui ca549fcb8e CPPICFLAGS -> CPPPICFLAGS (in comments) 2007-03-18 09:08:45 +00:00
pooka b0f9a8a9aa update and fix description of MKPUFFS 2007-02-24 18:53:34 +00:00
chs ca31efae54 switch the rest of the architectures to gdb6. 2007-02-19 18:31:21 +00:00
perry 34c4900430 Before I completely forget the issue, convert "PROG_PAX" to the
better-named "PAXCTL_FLAGS".
2007-01-25 23:04:28 +00:00
christos 855c80dc29 delete "-std=gnu99" from c++ flags. From mrg. 2007-01-22 21:49:07 +00:00
apb a45dfb93f4 Define TOOL_JOIN. 2007-01-14 16:19:55 +00:00
rumble 78f7b270d1 Fix a typo, tweak wording, and maintain consistency. 2006-12-30 04:45:13 +00:00
pooka 81b905fdbb if MKPUFFS=yes is given, build & install mount_psshfs (default: no) 2006-12-29 15:52:20 +00:00
macallan 610c0515b7 build XFree86 on shark 2006-12-21 01:45:32 +00:00
dyoung f3fbc3bb0f Change the name of the host disklabel to nbdisklabel-${MAKEWRAPPERMACHINE},
where ${MAKEWRAPPERMACHINE} is the suffix XXX on the target's make
wrapper, nbmake-XXX.

Fixes toolchain/30673, "single arch host disklabel isn't enough".
2006-12-09 20:13:13 +00:00
dsl 2abb1c7f9b If MAKEOBJDIRPREFIX or MAKEOBJDIR is defined, then we rely on make to
set .OBJDIR so 'make -V .OBJDIR' doesn't need to read any makefiles.
Given how much cud-chewing make does in order to read a line, this
speeds things up significantly (the operation in hand).
2006-11-29 21:49:39 +00:00
dsl d23b6980be Comment where make's internal copy of .OBJDIR gets changed 2006-11-26 20:09:57 +00:00
drochner 29d30258a4 mk.conf might refer to all kinds of make variables, so we can't just pull
it in without everything else (reported by martin). So revert to 1.485
which did at least work for everyone.
2006-11-26 13:59:49 +00:00
drochner 0c2df71a45 fix previous: need to pull in <bsd.obj.mk> to get the real .OBJDIR 2006-11-24 12:02:55 +00:00
martin 6a3c1d7aeb When checking wether we are debugging, look for -g in ${CFLAGS} instead
of ${COPTS}. The latter explicitly includes the former and ${DBG}, where
the -g most likely is hidden.
2006-11-23 12:05:26 +00:00
dsl 503ea65cd7 If we only want .OBJDIR printed, there is no point parsing the default
make rules, nor reading Makefile.
It is rather a shame we can't stop .depend being parsed as well.
Quite possibly one could argue that nothing in .depend should affect the
output of 'make -V xxxx'.
2006-11-22 22:04:57 +00:00
dsl 0d9ff52003 Mark all the .PHONY targets as .NOTMAIN in one go - instead of individually.
Add .WAITs after beforeinstall and before afterinstall.
Remove the bogus dependency lines that someone must have added with the
vague hope they would cause the build to happen in the right order!
Since we have 'realinstall:     proginstall scriptsinstall' stopping
'realinstall' running never has stopped 'proginstall' running.
Fixing this probably fixes a variety of problems, including, but not
restricted to 'install' in src/sys/arch/atari/stand/bootxx
(NB this particular file is untested due to other local changes)
2006-11-21 18:25:26 +00:00
christos 1bb72362cf more uucp removal. 2006-11-12 02:44:51 +00:00
jmmv abac724ef9 Also use libraries from /lib for binaries installed into /libexec. Needed
by lfs_cleanerd which is about to be moved to this directory.
2006-11-11 14:41:20 +00:00
christos 42b579bab8 disable SSP for standalone code. 2006-11-11 06:28:49 +00:00
christos d07f8e39ca don't run paxctl if other commands were specified for that target. 2006-11-11 06:15:55 +00:00
christos e81129f492 add the non tool version of paxctl 2006-11-10 17:22:19 +00:00
christos fef715f487 if ${PROG_PAX} is defined, run paxctl on the binary after linking with
the value of the variable. This way, if you set:

    PROG_PAX=+M

in /etc/mk.conf, you get what you deserve.
2006-11-10 17:13:15 +00:00
christos 3051b08454 Add ssp glue. 2006-11-09 17:06:54 +00:00
pooka bcb1fccca0 libpuffs 2006-10-22 22:53:41 +00:00
christos e9a36b93da Add -Wextra -Wno-unused-parameter to WARNS > 2 2006-10-22 22:17:30 +00:00
bjh21 7fb3ea3f6c Use GDB 6 on armeb as well. 2006-10-18 23:31:50 +00:00
bjh21 cc630e93eb GDB 6.5 seems to be basically functional on ARM, so make it the default there. 2006-10-18 23:22:24 +00:00
mrg b55240a473 - clean up some comments to reality.
- retire LIBDCK, LIBG2C and (long broken) USE_LIBSTDCXX
- in bsd.hostprog.mk's LIBSTDCPP -> LIBSTDCC
- add LIBSUPCXX
- don't default USE_LIBSTDCXX or USE_GCC4 since they are
  not used in the tree any where
- same with USE_XF86_4; retire it
- remove _SUPCXX handling in bsd.prog.mk

inspired by PR#26714.
2006-10-09 08:32:11 +00:00
elad 83704dec18 PR/28368: Peter Postma: unrecognized option `-Wnetbsd-format-audit'
Apply patch from rivo nurges in #NetBSD-code, thanks!
2006-10-08 17:16:51 +00:00
tsutsui cd4f2a86f4 - pc532 is ${MACHINE}, not ${MACHINE_ARCH}; use ns32k
- fix a comment (sh5 has been switched to gcc4)
2006-10-01 05:06:20 +00:00
martin 37b5f548a5 Default sparc64 to gdb6. 2006-09-27 06:34:07 +00:00
matt a63ad7b671 Make GCC4 the default (except for pc532).
Switch powerpc to GDB6.
2006-09-26 22:11:32 +00:00
christos a08b6e285b switch i386 to gdb6. 2006-09-26 19:33:02 +00:00
skrll de030205fa Switch hppa to gcc4. 2006-09-22 13:14:59 +00:00
simonb ee167a117b Switch MIPS to gcc4 by default. 2006-09-19 04:16:11 +00:00
dbj 758985809b pay attention to MKUPDATE instead of UPDATE when installing libs 2006-09-18 05:15:35 +00:00
tsutsui 3d402afffa Switch m68k ports to gcc4.
Tested on most m68k ports. Still there is no report of
atari, cesfic, luna68k, and mvme68k on real machines,
but at least builds for these ports should work.
2006-09-17 04:40:04 +00:00
skrll 4f50b00c11 ia64 doesn't do gdb yet. 2006-09-14 06:28:47 +00:00
dbj b41feff50f fixes for installing into a case insensitive $DESTDIR
when files may have hard links to a a name that only differs by case
  - change install to unconditionally remove its temporary file
    when installing hard links with -r.  This avoids problems when
    built with posix rename(2) semantics and reinstalling an existing
    hard link.
  - rework hard link targets in bsd.man.mk and bsd.links.mk
    to use makefile constructs instead of shell constructs
  - always reinstall hard links that may have case conflicts, even
    when MKUPDATE=yes, this ensures that they get added to METALOG
  - remove man pages which were hard linked to themselves in libform
  - remove improper hard link command for existing man page in libkrb5
  - fix libl's makefile to include bsd.lib.mk at end
  - remove shell quoting in link target for test's [.1 man page
2006-09-11 22:24:09 +00:00
cherry 05c821640b Switch ia64 to gcc4 2006-09-10 21:04:43 +00:00
simonb b53f76b4fe Use -Wno-uninitialized for ns32k. For some reason, gcc on ns32k
doesn't detect initialisation correction in simple "for" loops like:
	for (i = 0; i < 10; i++)
		var = i;
2006-09-09 03:53:19 +00:00
scw f177e531c7 Switch sh5el to gcc4. 2006-09-04 20:03:21 +00:00
matt 02f1c8b0ef Make sure to compile things at -O2 for mips64e[bl] 2006-08-26 19:57:03 +00:00
matt c0b0d51c8c MACHINE_CPU for mips64e[bl] is mips 2006-08-26 19:56:37 +00:00
matt 9e051a8002 Add enough configury glue so that src/tools can build a N64 mips toolchain. 2006-08-25 23:35:04 +00:00
uwe d4491bfa15 Switch sh3 to gcc4.
sh3el tested on hpcsh.  sh3eb only compile-tested with an mmeye build.
2006-07-24 23:54:15 +00:00
lukem 2c9b699f2a add reminder to sync with etc/Makefile and share/man/man5/mk.conf.5 2006-07-23 12:31:29 +00:00
lukem cacf5bfacc Implement MKDEBUG:
If "no", don't build and install separate debugging symbols
	into /usr/libdata/debug.
	Default: no
2006-07-23 11:41:24 +00:00
lukem 8b3ce8625c Rename MKDEBUG to MKDEBUGLIB. 2006-07-22 05:29:03 +00:00
peter 669a86ac31 MKPAM default is "yes". 2006-07-14 21:37:10 +00:00
matt 49decd4131 Switch vax to GCC 4 2006-07-08 00:32:08 +00:00
mrg 252f1af0f5 -std=gnu99 can be applied with GCC>=3, not MACHINE != vax. 2006-07-01 06:02:51 +00:00
mrg 878c667fb1 vax needs NOPIC for >= GCC3 not just == GCC3. 2006-07-01 06:02:01 +00:00
mrg 72ccefa820 powerpc64 is big endian. 2006-06-30 05:46:33 +00:00
drochner c89713e730 switch alpha to gcc4 2006-06-26 15:30:05 +00:00
lukem 9dde4120d5 Don't invoke LD with LDFLAGS, since the latter is for CC.
If we need similar support for LD, we can implement another variable.
I couldn't find any obvious need for LDFLAGS by users of <bsd.kmod.mk>.
2006-06-26 04:07:34 +00:00
lukem 6be844e18e support MAKEVERBOSE 2006-06-25 15:17:22 +00:00
lukem 9e21440fb1 Move LDFLAGS to the CC section instead of the LD section. 2006-06-25 15:04:31 +00:00
mrg d1d848dac8 put hppa in to the list of working but not switched to GCC4 platforms. 2006-06-25 05:14:36 +00:00
garbled 1880a81bca Switch powerpc to gcc4. Confirmed working with prep and macppc ports. 2006-06-24 06:35:54 +00:00
mrg 157b90ce05 switch sun2 over to GCC4. however, turn off profiling for sun2 since
GCC4 generates bogus code when calling mcount().
2006-06-24 05:24:56 +00:00
mrg a1299d95e9 default MKISCSI to yes. 2006-06-24 05:16:32 +00:00
mrg 2ed89a9707 add support for MKISCSI=no. 2006-06-24 05:14:01 +00:00
christos e4cfbd8bf1 - switch arm, armeb, i386, sparc, sparc64, x86_64 to gcc4
as discussed with gimpy and phone.

- add glue for gdb-6 build
2006-06-23 21:51:02 +00:00
mrg 1167183c92 make powerpc64 use GCC4. the first GCC4 platform!
add mipsel and mipseb to the list of platforms that could have GCC4
but not done yet.
2006-06-22 20:13:14 +00:00
gdamore a5c89047c0 Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.)  This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.
2006-06-19 15:44:33 +00:00
gdamore 494d0cb31a Forgot to commit these for TOOL_SED. Thanks to tsutsui@ for pointing it out. 2006-06-18 14:38:48 +00:00
christos 79867d81ea PR/33681: Scott Ellis: Building 'bc' with SHAREDSTRINGS=yes fails
We need CPPFLAGS too now.
2006-06-09 19:16:36 +00:00
rpaulo 2e83915da9 Add variables for /libdata/firmware path. 2006-06-07 18:49:36 +00:00
mrg 0b591d2dfd delete support for USE_TOOLS_TOOLCHAIN and HAVE_GCC==2.
update the list of platforms that build for GCC4 (but do not switch
any of them yet.)
2006-06-02 22:21:34 +00:00
mrg db19e89e04 remove support for building (with) GCC 2.95. also:
- always install <stdbool.h>
- don't generate a fake one for vax / gettext.
2006-06-02 22:16:18 +00:00
christos 2cbaed172f Remove sendmail. 2006-05-30 00:42:29 +00:00
uwe d5328b65a0 Enable -Wold-style-cast for sh3 now that its stadarg.h doesn't use LHS casts. 2006-05-22 00:43:04 +00:00
christos 0d1e2d0056 Remove -Wno-attribute for gcc4 2006-05-20 00:48:41 +00:00
lukem a6538b604a LDFLAGS is for CC not LD. 2006-05-12 04:29:08 +00:00
mrg 8794aeca0e support CPPFLAG_ISYSTEMXX for GCC4. 2006-05-12 02:04:55 +00:00
mrg 38ef023f65 like we do for -Wno-traditional, remove -Wstrict-prototypes and
-Wmissing-prototypes from C++ since those are always requird for C++.
2006-05-12 02:03:35 +00:00
mrg 1ed40e7c8b add support for ${OBJCOPTS} and ${OBJCOPTS}.<lib|prog|fn>. 2006-05-11 23:47:34 +00:00
mrg ae844d5313 turn on -Wno-pointer-sign for all kernel code. 2006-05-11 22:24:48 +00:00
mrg 8154510479 for now, turn on -fno-strict-aliasing for GCC4. 2006-05-11 00:46:57 +00:00
groo ad8b178abb Add common/include to include path.
HI JASON!
2006-05-06 02:20:23 +00:00
uwe e34bcd0c5a netwinder uses loadable server modules.
(Oops, forgot to commit this change along with other netwinder
X server commits.  Unbreaks builds.)
2006-04-17 12:50:51 +00:00
tls 3b526da7d6 bsd.lib.mk used MKDEBUG, but nothing defined it. Fix this. 2006-04-09 04:21:27 +00:00
christos 1c364e3284 Add MKDEBUG and the ability to build debugging versions of the libraries. 2006-04-09 01:52:06 +00:00
mrg 0db1500b43 retire HAVE_GCC3/HAVE_GCC4 and introduce HAVE_GCC that is set to 2, 3 or 4. 2006-04-07 19:38:58 +00:00
christos 4e974b3144 Add a HAVE_GCC4 2006-04-01 20:20:28 +00:00
christos 45cfed2d83 make symlink types consistent. 2006-03-30 19:49:02 +00:00
jmc 603c15a57f Provide TOOL_GMAKE defintiion 2006-03-29 21:12:20 +00:00
jmc ba3b1be79f Provide a default for USE_GCC4 (no currently) so it can be tested against 2006-03-29 21:03:39 +00:00
he 50ea083318 The -Wno-packed switch is a gcc3+ thing, so place it where it won't
be picked up by gcc 2.95.3.  Fixes build problem for vax.
2006-03-27 11:50:08 +00:00
dogcow 7c781162f5 Add -Wno-packed, in preparation for gcc4.1.x; unlike most of the other
warnings, it (at best) flags possible underoptimization, and not any
code defects.
2006-03-25 22:23:04 +00:00
christos 9e91483c3d There is always one more KRB4 thing to remove. (from Jukka Salmi) 2006-03-20 21:48:43 +00:00
christos 6b61cedf51 Remove krb4 variables and libraries (Jukka Salmi) 2006-03-20 21:27:31 +00:00
christos c9a2b557c6 remove KRB4 libraries (Jukka Salmi) 2006-03-20 21:26:15 +00:00
christos 26c486a7c8 more Kerberos4 cleanup. 2006-03-20 21:25:31 +00:00
christos 5e46421102 Oops, I did not mean to commit that [turning on relative symlinks] 2006-03-20 18:18:41 +00:00
christos 85e611dd01 Goodbye KerberosIV 2006-03-20 04:03:10 +00:00
jwise 8bc0f5da0f Now that we have real build system support for syspkgs, remove someone's
half-implemented idea of building `syspkgs' (really a few giant blobs of the
same granularity of the old sets) using install(1).
2006-03-16 18:43:34 +00:00