Commit Graph

1440 Commits

Author SHA1 Message Date
skrll
ad376176f9 Switch ARM to gdb 5.3.
XXX 26bit support isn't there at the moment.
2003-11-05 07:14:31 +00:00
scw
b4816bc53a Use MACHINE_CPU instead of MACHINE_ARCH to select the appropriate
architecture directory under sys/lkm/arch. This permits a single
directory to be used for bi-endian architectures.
2003-11-04 14:52:22 +00:00
mrg
79281abf48 switch sun2 to GCC3 2003-11-04 07:14:24 +00:00
sekiya
f17c77ee73 Use XFree86 4.x on sgimips. 2003-11-03 00:30:34 +00:00
lukem
443c980dcd use ${.PREFIX} instead of ${.TARGET:R} 2003-10-29 02:10:57 +00:00
mrg
76dbb1d8cc GCC3:
- move m68000 into "mostly working" section
GDB53:
- move m68000 & armeb into "in progress" section
- enable sh3eb
2003-10-28 07:22:55 +00:00
simonb
c78d65c886 Sort MACHINE_ARCH's in the GDB section. 2003-10-28 07:09:03 +00:00
mrg
45e224e8d4 fix a typo in previous pointed out by lukem 2003-10-28 01:25:33 +00:00
mrg
8dcb3c2e33 allow -traditional-cpp to be overridden when making dependancies 2003-10-27 23:52:57 +00:00
mrg
3b4ce5498c turn on GCC3 for armeb 2003-10-27 01:45:20 +00:00
uwe
1312264774 Mark GCC3 for sh3el as "mostly working". Remaining issues are
toolchain/22452 and toolchain/22489 (gcc's optimization/11937).
2003-10-27 01:35:12 +00:00
uwe
0f1f83b0cc Switch sh3el to GDB 5.3. 2003-10-27 01:29:58 +00:00
mycroft
08c9a64727 I have no idea how this built, given that there seems to be a syntax error... 2003-10-26 06:26:26 +00:00
mycroft
07ea22b5b8 Note that armeb needs GCC 3, and hppa and m68000 need GDB 5.3. 2003-10-26 05:45:05 +00:00
lukem
7f41288379 use ${HOST_SH} instead of sh 2003-10-26 03:29:44 +00:00
lukem
5daa33014e Improve how build.sh -N and MAKEVERBOSE interoperate;
rather than adding '-s' to make's command line in the makewrapper,
use the .SILENT target based on MAKEVERBOSE's value.

This means that you can do:
	./build.sh -N 1 makewrapper

	$TOOLDIR/bin/nbmake-$MACHINE
	#  runs at MAKEVERBOSE==1, with command lines suppressed

	$TOOLDIR/bin/nbmake-$MACHINE MAKEVERBOSE=2
	#  runs at MAKEVERBOSE==2 for this invocation, with command lines shown
2003-10-26 02:17:46 +00:00
simonb
8652f3d5d3 Switch MIPS to GDB 5.3 2003-10-26 01:29:34 +00:00
mycroft
b1f62a47b0 Throw the switch for mipseb and mipsel -- GCC 3 works. 2003-10-25 22:25:55 +00:00
matt
da19615924 Switch VAX to GDB 5.3 2003-10-25 19:02:55 +00:00
mycroft
68fd22e460 68k works with GCC 3 on next68k and amiga. Throw the switch. 2003-10-24 17:44:36 +00:00
skrll
6cbe1f3d8f gdb 5.3 for arm is in progress 2003-10-22 07:43:59 +00:00
lukem
7675cc90f4 Move the MAKEVERBOSE setup from <bsd.sys.mk> to <bsd.own.mk>, and
change all the variable assignments from = to ?=
2003-10-21 16:36:58 +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
chs
7e53301bb7 fix parallel-make race. 2003-10-20 01:53:02 +00:00
lukem
0e3525fabb Add MAKEVERBOSE pretty versions for .cc .cpp .cxx .C
Fix typo in .l.o and .y.o rule
2003-10-20 00:24:22 +00:00
lukem
094017b449 add _MKMSGCREATE.m 2003-10-19 14:23:02 +00:00
lukem
b606e4ebf0 support MAKEVERBOSE 2003-10-19 06:10:41 +00:00
lukem
d931e2e741 support MAKEVERBOSE 2003-10-19 05:24:53 +00:00
lukem
4afe0be65c support MAKEVERBOSE for .txi.info .texi.info .texinfo.info 2003-10-19 04:54:53 +00:00
lukem
bef75a2e23 add _MKMSGINSTALL.m 2003-10-19 03:53:33 +00:00
lukem
d2142fb492 fix _MKSHECHO for MAKEVERBOSE=1 2003-10-19 03:21:18 +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
e14dfde075 Add rules for .s .s.o .S .S.o to support per-source COPTS,CPUFLAGS,CPPFLAGS
and MAKEVERBOSE
2003-10-19 02:11:29 +00:00
matt
7cca41f35a Default MK{BINUTILS,CVS,GCCCMDS,POSTFIX,SENDMAIL,UUCP} to yes 2003-10-18 23:40:36 +00:00
lukem
f1e290c260 implement MAKEVERBOSE for rules which are of the form:
@cmp -s ${.ALLSRC} ${.TARGET} || ( echo cmd && cmd )
2003-10-18 16:41:19 +00:00
lukem
52a5f69154 implement MAKEVERBOSE for filesinstall 2003-10-18 16:40:47 +00:00
lukem
d1ac0f085b implement MAKEVERBOSE 2003-10-18 15:37:29 +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
fvdl
95641fb068 Enable gdb 5.3 for MACHINE_ARCH == x86_64 2003-10-14 02:08:02 +00:00
lukem
7b256958f1 Only try to KERNOBJDIR!= if the required directory exists. 2003-10-11 08:05:57 +00:00
jdolecek
5951c8215b if S is not already defined, use ${NETBSDSRCDIR}/sys or ${BSDSRCDIR}/sys to set
top of kernel source tree
2003-10-11 07:15:59 +00:00
matt
7744cd370c HPPA toolchain is now in-tree. 2003-10-06 05:19:32 +00:00
fvdl
852a11e722 Enable gcc3 for x86_64. 2003-10-05 02:22:30 +00:00
lukem
58d2d9a196 Set _LIBLDOPTS to set -Wl,-rpath-link -R -L appropriately based
on the setting of ${SHLIBDIR} and ${SHLIBINSTALLDIR} (_not_ ${_LIBSODIR}).

Fixes cruel and unusual ^W^W^W obscure native-build and not-so-obscure
cross-builds problems I was having with shared libraries with a
non-base LIBDIR (e.g, /usr/X11R6/lib) that use LDADD to pull in other
libraries from /usr/lib (such as libm) which are really in /lib and the
symlink from ${DESTDIR}/usr/lib/libm.so to /lib/libm.so.N.M was confusing
the linker.  Stuffing -rpath-link ${DESTDIR}/lib in solves the problem.

This should mean that shared libraries that depend upon other shared
libraries in other directories should DTRT in a DESTDIR (cross-)build...

Inspired by _PROGLDOPTS in <bsd.prog.mk>
2003-09-30 07:24:23 +00:00
lukem
0f9e6cf359 Add LIBSTDCXX (for usr/lib/libstdc++.a).
Sync LIB* documentation with reality.
2003-09-29 01:06:37 +00:00
mycroft
b9556aa82f List VAX as non-GCC3. 2003-09-27 04:27:32 +00:00
christos
d1ec79f82d back out previous, suggested by gimpy. 2003-09-26 20:51:55 +00:00
christos
a28207daf8 entry for amd64->x86_64 map in gnu arch. 2003-09-26 20:40:29 +00:00
matt
c6d135e9c5 Switch Alpha to GDB5.3 2003-09-24 06:19:12 +00:00
matt
53ea4f5070 Switch PowerPC to GCC 3.3.1 and GDB 5.3. 2003-09-24 04:58:33 +00:00
christos
17a5344584 Turn on the switch for gdb53/m68k. Thanks Christian Limpach! 2003-09-23 13:45:27 +00:00
christos
802390c474 Add more comments for gdb-5.3 2003-09-22 14:50:51 +00:00
matt
f75f4d1a47 Add missing continuator. 2003-09-22 01:25:06 +00:00
matt
e99025e911 Switch MACHINE_ARCH arm to GCC 3.3.1 2003-09-21 20:16:47 +00:00
lukem
9c437ec754 Change LNFILES' to BUILDSYMLINKS', to more accurately describe its purpose.
Per discussion with Simon Gerraty.
2003-09-20 06:20:41 +00:00
martin
57b44eed3f Drop explicit medlow model and default to -O2 for sparc64. 2003-09-19 16:32:10 +00:00
mrg
ee467f4816 switch i386, sparc, sparc64 & alpha to GCC 3.3.1. 2003-09-19 08:15:46 +00:00
mrg
f9975d193b add a HAVE_GDB53 switch. defaults to no one yet. 2003-09-18 23:17:55 +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
lukem
6ede1ad4a2 in cleanx11man, support "MAN defaults to ${PROG}.1" 2003-09-13 20:39:45 +00:00
lukem
ee09f184e5 explicitly set BINDIR LIBDIR MANDIR here 2003-09-13 20:10:44 +00:00
lukem
403d124c72 implement MKSTATICLIB, which defaults to "yes". if "no" (which NOSTATICLIB
also sets, a la the other variables), prevents build and installation
of the "normal" static *.a libraries.
2003-09-13 19:08:26 +00:00
simonb
1cc7226c95 Fix a tyop, wrap some long lines. 2003-09-13 11:16:28 +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
ee20b1b408 sanitise ${DESTDIR}${SOMEOTHERVAR} 2003-09-13 00:16:10 +00:00
lukem
7be275a0ed add infrastructure to support reach-over builds of xsrc 2003-09-12 07:44:10 +00:00
lukem
5ec73d3c6d <bsd.x11.mk>: infrastructure to support reach-over builds of xsrc 2003-09-12 07:40:34 +00:00
lukem
959cbfd166 revert previous; there's too much hairy crap in sys/lkm/compat involving
the order that Makefile.inc is pulled in to get this to work.

this stuff needs a rototill (for another day). for example, having every
sys/lkm/** directory make their own  machine ${MACHINE_CPU} and possibly
${SHARED_MACHINE_CPU} (e.g, x86 for i386/x86_64) is not the most optimal
situation ...
2003-09-04 08:27:08 +00:00
lukem
f212488840 simplify include symlink creation with LNFILES 2003-09-04 07:15:43 +00:00
lukem
d4ea794325 .PHONY cleanlnfiles 2003-09-03 07:09:39 +00:00
lukem
518360ab1a pull in <bsd.files.mk> incase LNFILES is used by <bsd.man.mk> user. 2003-09-03 05:40:12 +00:00
lukem
d18c364585 Implement LNFILES: a list of two word items:
lnsrc lntgt
For each lnsrc item, create a symlink named lntgt.
The lntgt symlinks are removed by the cleandir target.
2003-09-03 05:38:09 +00:00
uwe
ce52f77fb0 Now that HAVE_GCC3 is always defined, adjust the logic that selects if
NOPIC for sh3 should be set to check the value of HAVE_GCC3.
2003-09-01 09:38:42 +00:00
martin
a79495d23b Default sparc64 to XFree 4. 2003-08-29 10:51:21 +00:00
tron
1fc6b8eac2 Fix logic error in last change which caused GCC 3.x to be the default for
several platforms unintentionally.
2003-08-28 12:28:34 +00:00
mrg
1a086c6b25 introduce an additional switch to enable building GCC3 instead of GCC2:
HAVE_GCC3.  if this is set, we also set USE_TOOLS_TOOLCHAIN=no.  change
the definition of the former to be restricted to whether tools/toolchain
is used or not.
2003-08-27 16:03:17 +00:00
lukem
40a8a5734e Support ${LDFLAGS} when linking libraries 2003-08-24 09:35:49 +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
christos
4ef8a70c82 Disable -Wtraditional and explain why. 2003-08-22 18:07:21 +00:00
lukem
28d70b03dc order .SUFFIXES similar to other *.mk files 2003-08-11 09:59:43 +00:00
martin
28ef1fc8fe Handle empty __DPSRCS.d, avoiding executing commands like "cat > .depend"
in directories where only non-C/C++ files are in SRCS (e.g.: the forth
code for sparc bootblocks).

Patch from Luke.
2003-08-06 13:55:11 +00:00
lukem
64b5a0fe7b Add INCSYMLINKS to <bsd.inc.mk> and <bsd.kinc.mk>, and use that instead of
SYMLINKS to install symlinked header files.  INCSYMLINKS are installed with
'make includes'.  This avoids using SYMLINKS and hacks with the 'linkinstall'
target in <bsd.links.mk>, as linksinstall occurs in 'make install' and hacks
to get it to occur in 'make includes' weren't robust, as seen in lib/libdes.

Yet more improvements to bsd.README.
2003-08-03 09:23:14 +00:00
lukem
d65b74da7c 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".

Update documentation for some other make variables
2003-08-02 00:34:25 +00:00
mrg
e128feab59 use -isystem-cxx for now. update the "mostly ready to switch to gcc3" list 2003-08-01 22:51:34 +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
3cbb5fea48 tweak ${DEPENDSRCS.d} target so that ${SRCS} isn't there. this fixes the
"make: out of memory" problem when make dependencies in lib/libc.

XXX: this is a temporary workaround.  i'm working on cleaning up how
the DPSRCS stuff is used throughout the tree...
2003-08-01 00:55:43 +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
86173c79de Set .NOPATH for all ${DEPENDSRCS} and not just .depend.
Should fix build problem noted by Geoff Wing on current-users@
2003-07-29 07:56:23 +00:00
lukem
c6fbe6d8e0 just add various files to ${DPSRCS} instead of trying to get
a ${DEPENDSRCS} target to DTRT
2003-07-29 02:42:49 +00:00
lukem
a0df1980db add bsd.dep.mk 2003-07-29 01:26:15 +00:00
lukem
bd166fb2bd * move .includes added in rev 1.5 to outside of .if defined(RPC_SVCFILES (oops)
* move ${DEPENDSRCS}: ...  to the end of the file
2003-07-29 01:12:46 +00:00
lukem
b082f4d46d Use the more "standard" foo.d' instead of foo.SUFFIX.dep'; the rules
are simpler and would have helped prevent the previous fubar.
Don't bother using -a with ${MKDEP} to build the individual .d files.
2003-07-28 23:57:24 +00:00
lukem
5aab21f43a be consistent when adding *.y and *.l to DPSRCS 2003-07-28 23:54:24 +00:00
matt
ebfb9912e2 Make all the suffix rules with .c .c.dep (e.g not .cc .cc.cc.dep) 2003-07-28 21:33:57 +00:00
lukem
eb51573bd7 Use ${DEPENDSRCS} as a target instead of .depend, now that
<bsd.dep.mk> builds .depend from .dep files.
2003-07-28 15:25:02 +00:00
lukem
8f4575345b Simplify .*.dep generation by using suffix transforms.
This also fixes a problem in the previous where the .ALLSRC would contain
any other dependencies that .depend had, thus breaking the mkdep invocation.

Provide DEPENDSRCS which effectively contains ".depend *.dep", to be
used in other Makefiles that want to add dependencies for .depend.
2003-07-28 15:07:16 +00:00
lukem
696a21d88f Always use the "per source file".dep method to build the .depend file
(that was formerly only used for HOST_CYGWIN.).
Clean up implementation to minimise unnecessary variable munging.
Ensure all .dep files are deleted in cleandepend:.

This allows us to correctly support CPPFLAGS.<file> in make depend, and
whilst this method is marginally slower in the "no existing .depend file"
case, it should be faster in the "rebuilding depend for a subset of
source files" case.
2003-07-28 08:59:52 +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
matt
1072487f05 Back last commit and just allow USE_TOOLS_TOOLCHAIN be overridden in the
environment.
2003-07-28 05:54:18 +00:00
matt
66430c1aa7 Let the if define USE_TOOLS_TOOLCHAIN. 2003-07-28 05:52:29 +00:00
lukem
e71812aa94 Overhaul how the .{c,cc,cpp,cxx,C,f,m.S}.{o,po,so} rules are implemented:
only list the (often complicated) ${COMPILE.*} rules once always building
to ${.TARGET}.tmp.  Then, depending on whether *OPTS has -g, either
"mv ${.TARGET}.tmp ${.TARGET}" or "${LD} -[xX] -r ${TARGET}.tmp -o ${.TARGET}"
as appropriate.
This can prevent inconsistency that could occur between "echo ${COMPILE.*:Q}"
and "${COMPILE.*}", such as the problem in rev 1.226.  (There were still
examples of this in .cc.so and .m.so !!!)

Remove `@' from most non-echo rules, so that we can actually see what's
happening.  This helps debugging problems, such as that fixed by rev 1.226.

Always remove all possible temp files that might occur because of the above.

Be consistent about ${CC} instead of $(CC)
2003-07-28 04:08:47 +00:00
lukem
5e2ad4afcc Be consistent how "multiple include protection" is implemented. I.e,
.if !defined(_BSD_foo_MK_)
	_BSD_foo_MK_=1

	# ...

	.endif	# !defined(_BSD_foo_MK_)
2003-07-28 02:38:33 +00:00
lukem
719829bd45 Pull in <bsd.sys.mk> before supplying our own .c.o (et al) rules.
Otherwise, <bsd.sys.mk>'s implementations will be used instead.  (oops!)
2003-07-28 02:29:35 +00:00
lukem
7cacdc7670 pull in <bsd.sys.mk> for TOOL_* incase this is used with USETOOLS=never 2003-07-28 01:00:52 +00:00
lukem
24da731a9c Pull in <bsd.sys.mk> as well, for the TOOL_ variables in the
USETOOLS=never case.
Found & fixed by Anders Hjalmarsson in PR misc/22283.
2003-07-28 00:57:25 +00:00
lukem
7a4d405e11 fix typo (insert botch? :) in previous, which broke .cxx.po 2003-07-28 00:51:47 +00:00
uwe
a82a596a31 Conditions for sh5 when setting DBG to be empty were deleted (moved)
in 1.72, but brought back accidentally in 1.73.  That was harmless,
anyway, as sh5 conditions in their new place get matched earlier.
2003-07-27 19:08:03 +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
lukem
422b438b9f Ensure the first word of ${CC} exists before attempting to invoke ${CC}
to determine TARGET_ENDIANNESS.

This should fix problem reported privately by Matt Green <mrg@>.

This uses  exists(${CC:ts::C/:.*$//})  as we don't expect the command name to
contain `:'.  (The ":ts" trick is from a discussion with Simon Gerraty <sjg@>.)
2003-07-27 11:16:30 +00:00
lukem
b7ebff3038 be consistent: use ${.TARGET} for $@ and ${.PREFIX} for $* 2003-07-27 09:35:47 +00:00
lukem
30872ad6e0 be consistent about using ${.TARGET} for $@ and ${.IMPSRC} for $< 2003-07-27 09:27:18 +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
mrg
9b2531b3d6 add a new variable USE_TOOLS_TOOLCHAIN that is set to "yes" currently, but
will be set to "no" when GCC3 is used in tree.
2003-07-25 16:24:08 +00:00
lukem
2c36cee56b update MKCRYPTO comment 2003-07-23 14:53:57 +00:00
itojun
e63468d8cc split MKKERBEROS4 from MKKERBEROS. based on work by lha at stacken.kth.se
(build confirmed with both MKKERBEROS4=yes and MKKERBEROS4=no)
2003-07-23 08:01:24 +00:00
mrg
ad4196a2ab switch sparc port to xfree 4 tree. 2003-07-22 11:48:59 +00:00
lukem
29c0479a2a Add source-file-specific variables in <bsd.lib.mk> and <bsd.prog.mk>:
COPTS.<fn>	Additional flags to the compiler when creating the C objects
		for <fn>.

CPUFLAGS.<fn>	Additional flags to the compiler/assembler for <fn>.

CPPFLAGS.<fn>	Additional flags to the C pre-processor for <fn>.


(For <fn>.[ly], "<fn>.c" must be used.)
2003-07-22 06:53:21 +00:00
lukem
e87b2970a6 improve documentation for bsd.files.mk and bsd.kernobj.mk 2003-07-22 04:23:28 +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
0f7d7b4fad Use ltarg=stat -qf '%Y' $l to read a symlink's target (and rely upon
a non-zero exit value to indicate a missing file or non-symlink),
instead of   test -h $l && ltarg=`ls -ld $l | awk '{print $NF}'`
since the former is quicker and more concise.
2003-07-20 15:02:10 +00:00
lukem
14fc1c5b77 <bsd.init.mk> is a good idea 2003-07-20 14:53:10 +00:00
lukem
a36d55e898 LINKS: use stat -qf '%d %i' $l to read the device & inode # of the source
and target (and rely upon a non-zero exit value to indicate a missing file),
instead instead of unconditionally installing the link.

SYMLINKS: use   stat -qf '%Y' $l   to read a symlink's target (and rely upon
a non-zero exit value to indicate a missing file or non-symlink),
instead of   test -h $l && ls -ld $l | awk '{print $NF}'    , since
the former is quicker and more concise.

This resolves PR toolchain/16885 from David Laight.
2003-07-20 14:49:44 +00:00
lukem
65668567d3 add TOOL_STAT for stat(1) 2003-07-20 14:36:12 +00:00
lukem
758ffcd440 more reordering 2003-07-20 14:27:57 +00:00
lukem
e928ba19c8 move MKCATPAGES info. add MKHOSTOBJ info 2003-07-18 15:44:07 +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
lukem
87610a53a9 whitespace cleanup 2003-07-18 04:04:03 +00:00
lukem
4d63406463 Add MKMANZ; if not set to "no", compress the manual pages at installation time.
This replaces the previous  .if defined (MANZ) behaviour, although the latter
will set MKMANZ=yes for compatibility purposes.

Don't bother with -P-bou in TOOL_ROFF_HTML; it doesn't appear to be
necessary with groff 1.19.

Fix NOHTML implementation to be consistent with other NOxxx / MKxxx
variables, and expose the user-tweakable MKHTML.
2003-07-18 02:52:51 +00:00
lukem
e8de180da8 reorder to be a bit more useable (imho) 2003-07-18 00:33:18 +00:00
lukem
7b7ea97741 Change the default TOOLDIR from
top-of-obj/tools/tools.OS-VERSION-STRING
to
	top-of-obj/tooldir.OS-VERSION-STRING

It's more consistent with the build.sh defaults for DESTDIR and
RELEASEDIR, and it's easier on "mr lazy completion fingers".
2003-07-16 13:19:49 +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
lukem
8e7657a643 Be consistent with other bsd.*.mk, and pull in <bsd.init.mk> at the
start (which pulls in <bsd.own.mk>), and <bsd.obj.mk> and <bsd.sys.mk>
at the end.  These provide the appropriate settings for TOOL_* .
2003-07-14 00:52:12 +00:00
lukem
d72803be72 Pull in <bsd.sys.mk> to provide the defaults for TOOL_* when USETOOLS=never 2003-07-14 00:50:04 +00:00
lukem
f0dafe0c0e use full path in default TOOL_MAKEWHATIS 2003-07-14 00:41:17 +00:00
lukem
001c68bd94 Rename a large chunk of the make(1) variables which refer to a
program/tool from "FOO" to "TOOL_FOO".  The new variables are:
	TOOL_ASN1_COMPILE  TOOL_CAP_MKDB  TOOL_CAT  TOOL_CKSUM  TOOL_COMPILE_ET
	TOOL_CONFIG  TOOL_CRUNCHGEN  TOOL_CTAGS  TOOL_DB  TOOL_EQN  TOOL_FGEN
	TOOL_GENCAT  TOOL_GROFF  TOOL_HEXDUMP  TOOL_INDXBIB  TOOL_INSTALLBOOT
	TOOL_INSTALL_INFO  TOOL_M4  TOOL_MAKEFS  TOOL_MAKEINFO  TOOL_MAKEWHATIS
	TOOL_MDSETIMAGE  TOOL_MENUC  TOOL_MKCSMAPPER  TOOL_MKESDB
	TOOL_MKLOCALE  TOOL_MKMAGIC  TOOL_MKTEMP  TOOL_MSGC  TOOL_MTREE
	TOOL_PAX  TOOL_PIC  TOOL_PREPMKBOOTIMAGE  TOOL_PWD_MKDB  TOOL_REFER
	TOOL_ROFF_ASCII  TOOL_ROFF_DVI  TOOL_ROFF_HTML  TOOL_ROFF_PS
	TOOL_ROFF_RAW  TOOL_RPCGEN  TOOL_SOELIM  TOOL_SUNLABEL  TOOL_TBL
	TOOL_UUDECODE  TOOL_VGRIND  TOOL_ZIC

For each, provide default in <bsd.sys.mk> of the form:
	TOOL_FOO?=	foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
	TOOL_FOO=	${TOOLDIR}/bin/${_TOOL_PREFIX}foo

Document all of these in bsd.README.

This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.
2003-07-10 10:33:58 +00:00
marcus
36874b6c58 With gcc3, PIC code can be created for sh3. 2003-07-02 15:37:21 +00:00
wiz
61ddcbc141 Adapt CATDEPS/HTMLDEPS for groff-1.19. 2003-06-30 18:49:05 +00:00
wiz
ee660f962d Add NROFF. 2003-06-30 18:48:52 +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
drochner
a915fb6b1e Use ${CC} instead of ${LD} to build shared objects.
(g)cc has all the knowledge which startfiles/libgcc to
use, so we don't need to duplicate all that here.

Externally visible change:
Shared objects are linked against libgcc_pic.a now
(if the in-tree gcc2 is used). This fixes problems with
dlopen()'ed objects referencing libgcc functions not used
(thus not linked in) by the main program.
2003-06-27 17:27:11 +00:00
drochner
672eca1975 provide a variable pointing to the directory where
the gcc provided crt*.o are located
2003-06-27 17:13:27 +00:00
tshiozak
e376aa8308 Citrus iconv support(3)
add host tools : mkcsmapper and mkesdb
  mkcsmapper - coded character set mapping table compiler
  mkesdb - encoding scheme database compiler
2003-06-26 06:30:07 +00:00
tron
085b2ab641 Fix "clean" rule to honor "CLEANFILES" variable. 2003-06-24 09:49:07 +00:00
itojun
ded3919389 define LIBEVENT 2003-06-13 04:04:18 +00:00
provos
5522c1a3bb add LIBEVENT 2003-06-12 23:26:19 +00:00
wiz
a233f087fe Add missing } for rev. 1.43. 2003-06-11 18:05:40 +00:00
wiz
cdf5450a15 Also recognize cpp files as C++ files for CYGWIN case. 2003-06-11 17:32:45 +00:00
christos
d30f98df35 recognize .cpp as c++ files. 2003-06-11 17:24:55 +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
thorpej
22791b9867 Add a CPUFLAGS variable which can be set by the user's mk.conf or in
the environment:

CPUFLAGS        Additional flags to the compiler/assembler to select
                CPU instruction set options, CPU tuning options, etc.

Since CPUFLAGS is not implicitly set by any part of the make infrastructure,
it is safe to set in mk.conf, unlike COPTS or DBG.
2003-05-30 18:43:23 +00:00
wiz
53588c2a8b Back this out until I know why it does not work. 2003-05-27 21:43:32 +00:00
wiz
43075c01c6 Use && instead of ; to only overwrite a file if the corresponding sed worked (from christos).
Add .cpp rules.
2003-05-27 19:32:18 +00:00
wiz
f338b31357 Add .cpp dependency rules. 2003-05-27 19:30:45 +00:00
wiz
135b433e9c s/${ECHO}/@echo/, since we don't define ECHO in share/mk. 2003-05-26 12:38:59 +00:00
lukem
76a3147d38 Remove dependency on ${RPCGEN}:
*	Unnecessarily causes lib/librpcsvc (etc) to be rebuilt every time
	rpcgen is updated.
    *	No other "generated" file (.l, .y, ...) depends upon its tool
    	like this
    *	As <bsd.own.mk> wasn't being pulled in, the tools/ version
    	wasn't being used, so a lot of times the dependency was wrong.

Fixes [toolchain/11568] by Bernd Ernesti.
2003-05-19 07:19:10 +00:00
lukem
4ae3ede358 Only determine TARGET_ENDIANNESS if it's not already defined. 2003-05-18 08:19:03 +00:00
lukem
65e312f75f Add ${TOOL_DB}; db(1) as a (host) tool.
Note: this is the first tool using a "TOOL_" prefix in the make(1) variable;
other similar "non-standard" variable names will be converted in the future.
2003-05-18 08:09:25 +00:00
lukem
03a26b2c80 make this a no-op if HOSTPROG is defined 2003-05-18 07:36:23 +00:00
dbj
f1e0ecadf7 remove dependencies on ${LIBC} ${LIBM} and ${LIBTERMCAP} static libraries
from host tool targets.  Commits fix from PR toolchain/21495
2003-05-14 00:24:06 +00:00
christos
b024767c0c Fix _HOST_CYGWIN lossage. 2003-05-08 20:39:00 +00:00
salo
1b089357bd Whitespace. 2003-05-08 18:59:06 +00:00
christos
e9672445c0 Hacks for limited command and environment space (John Gordon) 2003-05-08 13:34:07 +00:00
christos
61987b916a Deal with CYGWIN's sh screwage. 2003-05-08 13:02:09 +00:00
fvdl
6fd55b60ac Add -mcmodel=kernel to CFLAGS for amd64. 2003-05-07 22:36:06 +00:00
yamt
7fb7b24fed make RPC_XDRFILES depend on files in right directory. 2003-05-07 13:41:22 +00:00
fvdl
cfb43ff372 Default to -O2 for x86_64. 2003-05-04 12:05:50 +00:00
scw
ee96a063f1 Build shared libraries by default on sh5. They seem stable enough now. 2003-04-29 14:59:02 +00:00
fvdl
ee5c723638 Correct previous. MACHINE is amd64. MACHINE_ARCH is x86_64. 2003-04-27 10:15:01 +00:00
tron
ef4a5d5fc9 x86_64 -> amd64 2003-04-27 10:10:28 +00:00
fvdl
e937aee3c1 another x86_64 -> amd64 2003-04-26 20:55:40 +00:00
fvdl
0945a6df17 x86_64 -> amd64 2003-04-26 19:02:50 +00:00
matt
275eeea6c9 The __wrap_* symbols need to become local symbols. If you have module
x which is dependent y but they both have __wrap_foo, if the __wrap_foo
is not localized, you will get linker truncation messages.
2003-04-23 18:34:20 +00:00
christos
2b009f6aa8 fix lossage caused by previous commit. 2003-04-22 12:55:26 +00:00
christos
6fab16d795 PR/6257: Izumi Tsutsui: bsd.lib.mk should set target only if LIB is defined. 2003-04-20 21:57:17 +00:00
thorpej
9d788d6da1 Provide the MKPICLIB value in bsd.own.mk, rather than bsd.lib.mk. It
is sometimes necessary for non-library Makefiles to determine if _pic
libraries are being built.

Problem pointed out by Havard Eidnes.
2003-04-11 22:40:31 +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
fvdl
bb218b78eb gcc for x86_64 should be safe enough these days to enable -O by default. 2003-03-29 22:12:06 +00:00
christos
9453ca1e91 add x86 to the cleanfiles for i386 and x86_64 (Hi Frank!) 2003-03-27 17:05:14 +00:00
pooka
d223236902 add file as a host tool 2003-03-25 23:35:48 +00:00
thorpej
b48666e01a Add a HEXDUMP host tool. 2003-03-07 01:21:56 +00:00
fvdl
9f9a0457aa Add more special cases to create include directory symlinks, for archs
that take include files from a subdir != ${MACHINE_ARCH} (ew).
2003-02-27 11:09:59 +00:00
uwe
c18a5386dc Typo in comment. 2003-02-22 04:46:08 +00:00
matt
f65e1190f5 When making a LKM for powerpc, add function trampolines to undefined
functions.  This makes LKMs functional for powerpc.
2003-02-19 19:03:41 +00:00
thorpej
14dfb2cab0 Add LIBPTHREAD, LIBPTHREAD_DB, and LIBRT. 2003-01-24 02:06:37 +00:00
scw
3402e518ba The sh5 toolchain works fine with -O2 now. 2003-01-21 09:19:01 +00:00
lukem
4bb41ae2f2 Rework how KERNOBJDIR functions; now it's always determined with
cd ${KERNSRCDIR}/${KERNARCHDIR}/compile && ${PRINTOBJDIR}
This is far simpler than the previous system, and more robust with
objdirs built via BSDOBJDIR.

The previous method of finding KERNOBJDIR when using BSDOBJDIR by
referencing _SRC_TOP_OBJ_ from another directory was extremely
fragile due to the depth first tree walk by <bsd.subdir.mk>, and
the caching of _SRC_TOP_OBJ_ (with MAKEOVERRIDES) which would be
empty on the *first* pass to create fresh objdirs.

This change requires adding sys/arch/*/compile/Makefile to create
the objdir in that directory, and descending into arch/*/compile
from arch/*/Makefile.  Remove the now-unnecessary .keep_me files
whilst here.

Per lengthy discussion with Andrew Brown.
2003-01-06 17:40:18 +00:00
sommerfeld
24d16bebd2 Add bsd.rpc.mk to FILES 2003-01-05 23:37:02 +00:00
sommerfeld
d4b8f1f9fe Common makefile fragment for invoking rpcgen. See bsd.README for
documentation on the parameters which control this fragment's behavior.
2003-01-05 19:18:52 +00:00
lukem
144b55005f Rework METALOG manipulation:
- add '-D ${DESTDIR}' to INSTPRIV, so install(8) removes the leading
  ${DESTDIR} from the metalogged path
- provide ${METADB.add} variable (for "${CAT} -l >> ${METALOG}"), to make
  it easier to replace manual metalog manipulation in the future.
- with manual metalog additions, don't add the leading ${DESTDIR} in the path
- in maketars, use "mtree -C ..." instead of
  "mtree -D ... | sed -e 's,\(.*\) \(\..*\),\2 \1,";

Benefits:
- maketars "Parsing METALOG" step speeds up from 29 seconds to 1.2 seconds
  on a P3-600.
  (This also benefits "make installworld" at the top level.)
- ${DESTDIR}/METALOG is easier to read without the leading "${DESTDIR}"
  on all the pathnames, and it's smaller as well.
2002-12-23 06:52:48 +00:00
lukem
1bf2d8180e Only set INSTPRIV?= if "inside" a NetBSD src tree (i.e, ${_SRC_TOP_} != "").
Fixes a problem found by Andrew Brown where programs outside of the NetBSD
src that use the /usr/share/mk framework (such as pkgsrc/pkgtools/digest)
couldn't be installed if /usr/src/etc wasn't present.
2002-12-23 02:23:57 +00:00
lukem
4234e2eefe correct a comment 2002-12-23 02:01:29 +00:00
lukem
787757666a add SUNLABEL 2002-12-21 12:58:13 +00:00
jwise
a3a041633d Add a brief description of DPSRCS, whose discovery recently shortened two
Makefiles of mine by a few lines. :-)
2002-12-20 16:05:16 +00:00
lukem
7805822da2 Add "-N ${NETBSDSRCDIR}/etc" to ${INSTPRIV}, so that non-host ${INSTALL_*}
rules use that directory to lookup users & groups as opposed to the
host system's passwd(5) and group(5) databases.

This is a change of behaviour which should make the build system more
robust when new users & groups are added to the NetBSD source.

The only users who may be adversely affected are those (small number,
if any) that renumber the uids & gids away from the "standard" NetBSD
ones; in this case said users should maintain local mods to
${NETBSDSRCDIR}/etc/{master.passwd,group} ...
2002-12-19 12:44:03 +00:00
thorpej
c4a72b6436 Centralize the definition of the tool name prefix (i.e. "nb") into
bsd.own.mk, as the _TOOL_PREFIX variable.
2002-12-08 20:19:56 +00:00
lukem
9145235642 Deprecate SYS_INCLUDE and the optional SYS_INCLUDE=symlinks functionality,
and only support the "copies" default.
Per discussion on tech-userlevel@.
2002-11-26 23:15:53 +00:00
thorpej
16f21f8705 * If EXTERNAL_TOOLCHAIN is defined, consider it to be the root of
where the GNU tools are found, e.g. ${EXTERNAL_TOOLCHAIN}/bin/...
* Allow MACHINE_GNU_PLATFORM to be set in mk.conf.
2002-11-26 19:51:16 +00:00
thorpej
e4637c735b sh64 -> sh5, which matches the names that the NetBSD-targeted GNU
toolchain uses for 32-bit SH5.  OK'd by steve.
2002-11-26 19:30:13 +00:00
thorpej
f176c534d2 The traditional C preprocessor is fixed in GCC 3.3 now, so no need
to skip -traditional-cpp for HAVE_GCC3.
2002-11-26 18:42:30 +00:00
thorpej
841722bb50 Add -Wno-sign-compare to CFLAGS. 2002-11-25 03:03:13 +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
thorpej
0d842ff28e Oops, AINC actually is still used; put it back. 2002-11-10 21:26:44 +00:00
thorpej
ca760b0a32 The MIPS toolchain now defines __ABICALLS__ when abicalls are in use,
and the sources now use that define, so there is no need for us to define
ABICALLS.  Since that was the only use for the AINC variable, garbage-collect
it.
2002-11-10 18:15:29 +00:00
thorpej
5d2465f251 Now that the compiler does the right thing with -KPIC, we no longer
need to add it (or -fpic, for that matter) explicitly when building
shared libraries on MIPS.
2002-11-09 08:22:04 +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
thorpej
0f181e084a Back out previous; it was incomplete. 2002-09-27 17:03:08 +00:00
thorpej
6a244932ed 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.
2002-09-27 15:56:39 +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
lukem
2f7d49d929 Enable MKDYNAMICROOT=yes by default.
This means that:
    +	/bin and /sbin (and the few programs in /usr/* which were statically
	linked) are now dynamically linked.
    +	The shared libraries that are needed by the /bin and /sbin programs
	are now installed into /lib (with compatability symlinks from
	/usr/lib).  These are:
		c crypt edit ipsec kvm m m387 termcap termlib util z
    +	The shared linker is now in /libexec/ld.elf_so, and
	/usr/libexec/ld.elf_so is a symlink to the former.

If you want the prior behaviour of "some applications statically linked,
the rest dynamically linked", set MKDYNAMICROOT=no in your mk.conf(5).

If you have a philosophical objection to dynamic libraries, continue
to set LDSTATIC=-static in your mk.conf(5), and please don't waste any
more time in trying to convince us why dynamic libraries are 3v1l.
2002-09-22 15:08:17 +00:00
thorpej
3b08abd277 * Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:

  TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
  no working in-tree toolchain (hppa, ns32k, sh5, x86_64).

  EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
  an external toolchain (e.g. /usr/local/gnu).  This enables the cross-build
  framework even for TOOLCHAIN_MISSING platforms.

  If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
  unconditionally set to "no", since the bits are not there to build.

  If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
  since the external toolchain's compiler is not in-sync with the
  in-tree compiler support components (e.g. libgcc).

* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
  that file can use it.
2002-09-17 23:18:25 +00:00
thorpej
2f50b4a3fb No longer have to invoke lorder with the shell explicitly; the host
tool is patched to use the working shell as the interpreter.
2002-09-15 17:07:14 +00:00
thorpej
4c81eb7f69 If DESTDIR is set, add ${DESTDIR}/usr/libdata to the lint library
search path.  This works around the problem of lint using the
wrong lint libraries until a "lint -d ..." equivalent is implemented
for libraries.
2002-09-14 16:56:10 +00:00
thorpej
5d0c1f4d8b * Add MKTEMP as a host tool.
* Pass MKTEMP to lorder, and invoke lorder with sh.
2002-09-14 05:01:45 +00:00
thorpej
3e19f8e1f0 Build a .gdbinit in the objdir when building a program. The .gdbinit
file sets the shared library prefix to ${DESTDIR}, and adds "sources"
directives for each file listed in the GDBINIT Makefile variable.
2002-09-08 03:59:02 +00:00
lukem
08e7e88032 In the MKDYNAMICROOT==yes case, move the shared linker from /lib/ld.elf_so to
/libexec/ld.elf_so.  Per discussion with a few other developers.
2002-08-28 09:57:10 +00:00
lukem
ed401558f2 Implement MKDYNAMICROOT, which currently defaults to "no", but will
be changed in the future to "yes".

If MKDYNAMICROOT == "no", there is no change from existing behaviour
of a static /bin and /sbin (and a few programs in elsewhere).

If MKDYNAMICROOT == "yes", the following changes occur:
    in <bsd.own.mk>:
	SHLIBDIR?=     /lib
	SHLINKDIR?=	/lib
    in various Makefiles, the following entry is DISABLED.
	LDSTATIC?=-static
This results in all programs (except those "standalone" programs built
in sys/arch/*/stand) are linked dynamically, the shared linker is moved
from /usr/libexec to /lib (with a compat symlink), and the shared
libraries used by /bin and /sbin programs are moved from /usr/lib to
/lib (with compat symlinks).
2002-08-27 14:46:11 +00:00
lukem
9aa0322535 don't bother with "rm -f $$t" before ${INSTALL_LINK} or ${INSTALL_SYMLINK},
as they default to using install(1) -r.
the rm can cause problems in certain situations, such as moving a library or
shared linker that install(1) depends upon to another location and replacing
it with a (sym)link.
2002-08-24 13:12:38 +00:00
lukem
811a3185a3 Explicitly note that if NOxxx and USE_SHLIBDIR are set by a Makefile,
it must be before <bsd.own.mk> is included.
2002-08-19 14:51:58 +00:00
thorpej
364a2bbe9c Add LIBPMC. 2002-08-09 00:21:22 +00:00
chris
07bc5d7a16 Default cats to using X 4.
Also correct macppc entry while here.
2002-08-03 22:10:07 +00:00
jdolecek
6dbfb914a2 add 'sun68k' to CLEANFILES for sun2/sun3
add 'sparc' to CLEANFILES for sparc64
2002-07-29 07:42:52 +00:00
mrg
eca4d02c51 be sure to link "sparc" dir as well, for sparc64 2002-07-20 11:44:31 +00:00
mrg
83a8e86ca3 add -Wa,-Av8plus to CFLAGS if we are building for 32bit sparc 2002-07-20 11:43:34 +00:00
yamt
4f420b3122 - add CSHLIBFLAGS.
- fix typos in comment.
2002-07-20 08:50:10 +00:00
mycroft
6b3df890c5 USE_XF86_4 on macppc. 2002-07-17 20:02:15 +00:00
fredette
f53ba8285a Now build profiled libraries on m68000. 2002-07-17 18:46:12 +00:00
scw
cad6d3b034 Add MKBFD=no for SH5. 2002-07-11 15:30:03 +00:00
scw
8debe49965 SH5 Makefile Magic. 2002-07-11 15:00:57 +00:00
tron
2bd3a8cf3c Use XFree86 4.x by default on i386 and x86_64.
This change was approved by Frank van der Linden.
2002-07-03 11:51:34 +00:00
fredette
fbd75fdec9 Enabled building PIC on hppa. Also don't use a --netbsdelf GNU target name. 2002-07-01 19:31:12 +00:00
fredette
cb3f47b13c Like on x86_64, don't use -O at all with the hppa compiler. 2002-07-01 19:30:36 +00:00
fredette
9c5d82c38e Added a temporary workaround when building libraries for hppa:
link in libgcc to get the millicode routines.
2002-07-01 19:29:31 +00:00
lukem
cbc959037f add CAT here too 2002-06-11 16:25:11 +00:00
mason
7e7e806c7e Add cat(1) as a host tool. 2002-06-10 18:32:28 +00:00
fredette
964be1b6b3 Add cases for hppa. 2002-06-10 14:14:47 +00:00
itojun
608d40cf27 sync LIBxx with bsd.prog.mk
XXX bsd.prog.mk and bsd.hostprog.mk defines very similar thing
- can we unify them? at least the definition?
2002-06-09 04:04:32 +00:00
thorpej
fc4bb28e9c Don't -I${DESTDIR}/usr/include without -nostdinc'ing, first. Some
versions of GCC are unhappy with that.
2002-06-05 02:47:56 +00:00
thorpej
055791361b Some changes to facilitate fixing the toolchain issue on ns32k:
* Don't make OBJECT_FMT dependent on USE_NEW_TOOLCHAIN.  All ports
  except ns32k are ELF, so set it appropriately.  Allow it to be
  overridden in the ns32k case.
* If ns32k && USE_NEW_TOOLCHAIN, don't build shared libraries, because
  external toolchains don't support them for our a.out.
* If ns32k && OBJECT_FMT == ELF, the GNU platform is "netbsdelf".
* If ns32k && USE_NEW_TOOLCHAIN, don't attempt to build the in-tree
  binutils 2.11.2, gdb 5.0, or gcc 2.95.3.

This allows us to do USE_NEW_TOOLCHAIN cross-builds to ns32k using
an external toolchain.
2002-06-05 02:42:09 +00:00
thorpej
a46ef4e6ab Don't use -traditional-cpp if HAVE_GCC3. 2002-06-04 21:14:59 +00:00
thorpej
f7e9eefade Add case for armeb. 2002-06-04 21:13:21 +00:00
itojun
8dea09ecf9 comment 2002-05-30 21:55:14 +00:00
msaitoh
0a2fcbab95 remove duplicated -Wpointer-arith when WARNS=2 2002-05-30 21:44:07 +00:00
itojun
dbbcec2c04 have bsd.endian.mk, which detects target endian.
generate *.db in target endian.  (see tech-userlevel for discussions)
2002-05-30 21:40:47 +00:00