Commit Graph

1405 Commits

Author SHA1 Message Date
jb
6e6cd73247 Support cross architectures by using specific directories instead of
the ones that match the host.
1998-05-04 22:09:10 +00:00
jb
07ae6a1cd9 i386 gas config files. 1998-05-04 22:05:54 +00:00
jb
68946743c2 Alpha gas config files. 1998-05-04 22:04:55 +00:00
jb
de7cf23d85 Support cross-architectures using sub-directories. 1998-05-04 22:03:00 +00:00
jb
d6e6b18362 Add support for cross-architecture gases. Since the GNU code doesn't
support more than one architecture at a time, build as from the
default for the host and if CROSS_TOOLS defines other architectures,
build them as as_${arch}
1998-05-04 22:01:27 +00:00
jb
b94d2d51b6 BINDIR is now specified in a single place. There are no cross-architecture
issues with this utility.
1998-05-04 21:51:32 +00:00
jb
498f0b7f68 Work out the list of emulations based on the cross-architectures
defined. The TARGET is now set from an included makefile.
1998-05-04 21:38:46 +00:00
jb
1123eec8d4 Add cross-architecture support. 1998-05-04 21:29:54 +00:00
jb
db186c5f78 BINDIR is now specified in a single place. There are no cross-architecture
issues with this utility.
1998-05-04 21:27:17 +00:00
jb
de5f2b02c8 BIDIR is now specified in a single place. There are no cross-architecture
issues with this utility.
1998-05-04 21:23:23 +00:00
jb
5162c01e16 Evaluate the TARGET from the architecture. We'll assume that FREEBSD
is ELF from here on.
1998-05-04 21:21:17 +00:00
jb
0de52d3ae8 Remote i386 cross-architecture support. It's now configurable, and off
by default.
1998-05-04 21:18:46 +00:00
jb
ede6adce70 Add cross-architecture support. 1998-05-04 21:16:46 +00:00
jb
6e5674b484 Since the makefiles below binutils with the architecture extension
are now included according to the cross-architecture support required,
default the BINDIR for i386 to /usr/libexec/elf here instead of in
all the i386 specific makefiles. For all other architectures, BINDIR
is just /usr/bin.
1998-05-04 21:13:50 +00:00
jb
2f13136793 Add makefile support for cross-architectures. Allow CROSS_TOOLS to
be defined (in /etc/make.conf, say) and set to the additional architectures
that need to be compiled in. So on alpha I set CROSS_TOOLS = i386.
On i386 you can't build alpha due to lack of 64-bit support on 32-bit
architectures, but that's a GNU problem.

This change relies on makefiles in the binutils sub-directories having
the extension defined in the CROSS_TOOLS, instead of those makefiles
being selected based on the host architecture.
1998-05-04 21:10:56 +00:00
bde
6a77e9f036 Fixed races in `make -jN' using new yacc rules. 1998-05-04 20:09:06 +00:00
bde
50177b6413 Don't add y.tab.h to CLEANFILES, since this would now be done centrally
if y.tab.h were generated.  Don't generate y.tab.h, since it is not used.
1998-05-04 18:13:54 +00:00
bde
7ff9e41f25 Simplified using new yacc rules. This is cosmetic - the old rules
worked because .ORDER prevented problems from concurrent generation
of multiple parsers (and their headers), and there were no missing
dependencies because the generated headers were not actually used.
1998-05-04 17:56:22 +00:00
bde
d6f36ccf87 Simplified using new yacc rules. This is cosmetic - the old rules worked
with `make -jN' because they did the right things to generate cexp.h
without clobbering cexp.c, and there were no missing dependencies on
cexp.h because cexp.h isn't actually used.

Fixed style bugs.
1998-05-04 16:58:50 +00:00
bde
2daef1b2dd Fixed races in `make -jN' using new yacc rules. This also fixes plain
`make' (without a previous `make depend').
1998-05-04 16:31:41 +00:00
bde
4a27e271a6 Fixed races in `make -jN' using new yacc rules.
Fixed slightly wrong order of -I's in CFLAGS.

FIxed the usual style bugs in DPADD and LDADD.
1998-05-04 16:22:30 +00:00
bde
eb3a97224d Symlink awk.y to awktab.y so that the default yacc rules apply, and use
the (new) default yacc rules.  This is cosmetic - the special rule was
good enough here because y.tab.h is not used.

Don't generate y.output.
1998-05-04 16:18:57 +00:00
wosch
c6d2d64985 Added a alpha category to the list. 1998-05-04 10:13:08 +00:00
ache
bee50ca004 Do not store the same config.h twice - use one from bc directory 1998-05-01 19:20:42 +00:00
ache
65e1c8bf81 Add missing -DHAVE_CONFIG_H 1998-05-01 19:13:41 +00:00
bde
e289066130 Inherit BINDIR properly. 1998-05-01 14:48:06 +00:00
bde
a6a0252a62 Fixed apparent bitrot (=' changed to ?=') in the definition of BINDIR
in the previous commit.  Just don't define it here at all.  This works
now that the default is inherited properly.
1998-05-01 14:44:00 +00:00
bde
0ebc6eb30c Removed self-inclusion-prevention ifdef. It is unnecessary now that
bsd.man.mk doesn't include ${.CURDIR}/../Makefile.inc.

Removed GDBDIR-redefinition-prevention ifdef.  It hasn't done anothing
for a long time, if ever.  The directory is defined to the same value in
each subdir and had the same value because all subdirs are at the same
level.  Keep defining it in the subdirs since that is more flexible and
no more verbose.

Prepare to inherit BINDIR by including ../Makefile.inc.
1998-05-01 14:37:36 +00:00
bde
d3771978e2 Oops, This should have been committed with the Makefile change that
requires the new file.

Fixed stale near-copy of contrib/libreadline/doc/hsuser.texinfo.  Patch
it at build ntime, and only keep the patch for it here.

Don't keep a copy of contrib/gdb/gdb/doc/all-cfg.texi here.  Link to it
at build time.
1998-05-01 14:13:00 +00:00
bde
73fe35c00a Fixed dependencies.
Fixed stale near-copy of contrib/libreadline/doc/hsuser.texinfo.  Patch
it at build ntime, and only keep the patch for it here.

Don't keep a copy of contrib/gdb/gdb/doc/all-cfg.texi here.  Link to it
at build time.
1998-05-01 14:08:30 +00:00
des
cf92fa4694 Don't delete man pages with colons in their name (e.g. Perl 5 manpages)
PR:		bin/5439
Submitted by:	Martin Kammerhofer dada@sbox.tu-graz.ac.at
1998-05-01 13:27:27 +00:00
bde
f89cad2dee Added missing -DHAVE_CONFIG_H to CFLAGS. It happens to be a no-op here
only because dc doesn't use anything in the gnu library that has a
significant dependency on config.h.

Simplified paths.
1998-05-01 12:01:57 +00:00
andreas
bc4783b950 Style:
$Id$ should be preceded by a tab
Don't include ../Makefile.inc when it is not used explicitly
Use the normal amount of horizontal and vertical whitspace (1 tab/none)
Don't override the (correct) default for MAN1
Use the correct order for -I paths
Use config.h generated by `configure', don't use a huge CFLAGS statement
Enable useage of libreadline in config.h, configure didn't enable it itself.
1998-05-01 10:01:02 +00:00
andreas
92d074975b Style:
- Makefiles shouldn't have copyrights.
- $Id$ should be preceded by a tab.
- Don't include ../Makefile.inc when it is not used explicitly.
- Use the normal amount of horizontal and vertical whitspace (1 tab/none).
- Don't override the (correct) default for MAN1.
- Use the correct order for -I paths.
- Don't use += to initialize SUBDIR.
- use the config.h generated by `configure' and don't use a huge
  CFLAGS statement.
I think the other Makefiles under src/gnu needs some polishing as well ;-)
Thanks to Bruce, everythig looks smarter now.
Obtained from:	Bruce Evans <bde@zeta.org.au>
1998-05-01 09:51:31 +00:00
dfr
defbb23e55 Add ELF support. 1998-05-01 08:40:11 +00:00
ache
20965c43df Add libtermcap to DPADD too 1998-05-01 04:42:53 +00:00
scrappy
36d95efc69 -ltermcap is required due to -lreadline else you get missing functions
like 'tputs()' et al...
1998-05-01 02:49:40 +00:00
ache
741c006bee Use generated bc.h 1998-04-30 15:59:49 +00:00
ache
00781e5fed Turn on Readline support 1998-04-30 08:14:04 +00:00
dfr
b6d45ffb75 Add support for ELF shared libraries. Also use bfd from the binutils in that
case rather than gdb's own copy.
1998-04-30 08:03:50 +00:00
ache
209947fd5f fix make - use -I${.CURDIR} instead -I. 1998-04-30 07:52:05 +00:00
ache
c7fe152504 Fix make - use -I${.CURDIR} instead of -I. 1998-04-30 07:50:49 +00:00
andreas
fc00353bf3 update dc utility as well
after importing the new bc-1.0.4 sources,
which contain the latest DNU dc version
1998-04-29 22:15:05 +00:00
andreas
fc12edd4a3 remove old bc-1.0.3 stuff
modify Makefile, to get bc-1.0.4 from src/contrib/bc
adjust config.h
PR:		closes 4183
1998-04-29 22:05:39 +00:00
bde
653fa61329 Fixed missing dependencies. The critical missing one was of bi-lexer.o
on bi-parser.h.  Not having it sometimes (only with `make -j') triggered
a bug suite that led to ordinary cpp output being put in .depend files.
Various bugs (the main one only with `make -j') prevented timely detection
of failure to build and install gnu/usr.bin/cc.  Eventually the missing
${WORLDTMP}/usr/libexec/cpp caused ${WORLDTMP}/usr/bin/cpp to be invoked
by cc, and this version of cpp is not suitable for such invocation.
Ordinary cpp output was put in .depend files when cpp terminated options
processing before seeing the -M flag.

Cleaned up.
1998-04-23 16:30:51 +00:00
eivind
fb823368ea Add an ".ifmake regress" to avoid warning during 'make world'.
Noticed by:	bde
1998-04-19 14:27:45 +00:00
bde
f2eb5898a6 Never generate neqn at install time (the previous fix for this was
incomplete).
1998-04-19 13:25:54 +00:00
jdp
e3551837c7 Fix the assembler so that it produces object files with the correct
magic number byte ordering for FreeBSD.  This makes "file" describe
our object files as "FreeBSD/i386 object" instead of as NetBSD
object files.  In case this seems drastic and risky, Bruce points
out that the "ld -r -x" step that is done on every object file when
building libraries fixes the byte ordering in the same way.  I have
been running with this patch for over a month and have seen no
problems.
1998-04-10 01:20:40 +00:00
jdp
8bd8fe03f1 Fix a bug which clobbered linker set symbols that had forward references.
With -O3, egcs generates such forward references.

PR:		gnu/6055
Reviewed by:	jdp
Submitted by:	Dmitrij Tejblum <tejblum@arc.hq.cti.ru> in slightly different form
1998-04-07 17:10:01 +00:00
charnier
279976e0ae Use .An/.Aq. 1998-04-01 06:29:16 +00:00
charnier
dfb7ad7bad .Use .An. 1998-04-01 06:26:40 +00:00
charnier
75fd82bc71 Use .An/.Aq. 1998-04-01 06:22:28 +00:00
charnier
356b5642c1 Use .An/.Aq.PR: 1998-03-31 06:52:28 +00:00
jdp
4719e802ae Give up on a.out support in binutils. It has too many problems to
be worth much effort.  Install all i386 binutils programs in
"/usr/libexec/elf".  Disable a.out support in libbfd.  It's too
dangerous to leave it in.  Some of the utilities think they can
handle a.out, but they generate bad object files.
1998-03-30 02:21:27 +00:00
jdp
864a637ca2 Add c++filt. 1998-03-30 02:19:09 +00:00
jdp
b2a8915ff0 Add support for the AT&T style "fildll" and "fistpll" mnemonics.
These are equivalent to "fildq" and "fistpq" respectively.  This
fixes the bad floating point object code that resulted after recent
changes in the compiler.

Test driven by:	"Mike Burgett" <mburgett@awen.com>,
		Amancio Hasty <hasty@rah.star-gate.com>
1998-03-29 01:38:39 +00:00
eivind
4be7a3d820 Activate CVS regression test. 1998-03-28 19:06:21 +00:00
dima
6fcc7e1ae3 Don't build sperl if you don't want to. 1998-03-26 06:06:22 +00:00
bde
f291ac2d4d Support building of libgcc.a without building all of gcc. This is
useful for bootstrapping.  Compatible versions of gcc and cc1 should
should be installed before using this feature.
1998-03-23 12:23:13 +00:00
bde
fdb190e183 Honour -static in LDLAGS. ld without -Bstatic is happy to choose
static libraries if there are no shared libraries in the search path,
but gcc without -static blindly attempts to link crt0.o.
1998-03-23 11:50:38 +00:00
bde
8f04cb6a75 Generate files at build time, not at install time. This should be the
last fix of this type.  Installing from a read-only object tree should
work now.

Install files using a single install command where this is easy; don't
use shell loops.

Don't use MANDEPEND to complicate things.
1998-03-21 12:12:55 +00:00
bde
a49cc476c2 Don't use beforedepend to complicate and break things. Just put
generated source files in SRCS.
1998-03-20 12:13:10 +00:00
bde
5a71334c65 Put generated source files in SRCS. This fixes races generating
the source files.  E.g., the stale version of locate.cc in the
source directory was sometimes used.  We didn't even use beforedepend.

Added temporary files to CLEANFILES.

Fixed some style bugs.
1998-03-20 12:05:50 +00:00
bde
b05eb6bff2 Don't use beforedepend to complicate and break things. Just put
generated source files in SRCS.

Don't use MANDEPEND to complicate things.  Just put the generated
man page in CLEANFILES.

Partly fixed yacc header brokenness, as in ../eqn/Makefile.

Added temporary files to CLEANFILES.

Fixed some style bugs.
1998-03-20 12:04:59 +00:00
bde
9a8bd5ce8d Don't use beforedepend to complicate and break things. Just put
generated source files in SRCS.

Don't use MANDEPEND to complicate things.  Just set MAN1 and put
generated man pages in CLEANFILES.

Added temporary files to CLEANFILES.

Partly fixed a potentially fatal bug involving the yacc header.
We generate eqn.cc (even if there is a version of it in the source
directory older than eqn.y) and a matching eqn.tab.h, but only use
the possibly-non-matching eqn.tab.h in the source directory.  This
works because Cygnus's yacc happened to generate a y.tab.h identical
to the current generated one.  The correct version will be used
when the wrong version is deleted from the source tree.  Kludge to
get the header generated early enough.  Yacc headers are mishandled
everywhere they are renamed (and used).

Generate neqn at build time, not at install time.

Fixed some style bugs.
1998-03-20 12:03:53 +00:00
bde
d050384644 Removed bogus -I path. The correct path is in all subdir Makefiles
where it matters.
1998-03-20 11:08:52 +00:00
bde
e04214d4ef Removed vestiges of use of beforedepend target. 1998-03-19 15:21:19 +00:00
obrien
f25718d167 I goofed on the `LINKS' syntax.
Submitted by:	Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
1998-03-18 12:28:09 +00:00
jdp
3faa4c248d Make the binutils strip ELF-only for now. It isn't quite right for a.out. 1998-03-15 02:08:04 +00:00
jdp
a82c785c1f Disable support for the a.out-i386-bsd target. Everything it can do
seems to be supported in the a.out-i386-freebsd target.  When both
are present, there are sometimes complaints of "ambiguous file
format."
1998-03-14 01:40:31 +00:00
jb
40631c1b01 Add binutils if BINFORMAT is elf. This is needed for alpha, and it
works on i386, but is still disabled until you set BINFORMAT.
1998-03-13 19:34:40 +00:00
jb
d7785ecc91 Configure alpha to disassemble both alpha and i386 opcodes. 1998-03-12 13:02:46 +00:00
bde
cfd76e19bd Fixed `make -jN depend' (N >= 2) by removing the beforedepend
target.  .ORDER doesn't work right, but is used for things related
to the depend target.  It "works" for the depend target by skipping
the build of .depend when N >= 2 and there is a non-default
beforedepend target with no rules.  Recent fixes made almost all
the beforedepend targets in the tree a no-op except for this bug.

Removed vestiges of elf and aout targets.
1998-03-12 12:52:24 +00:00
jb
e36c68ea00 Configure bfd for elf64, elf32, and aout. Yes alpha can handle i386
formats. No i386 can't handle alpha formats. 8-)
1998-03-12 12:29:20 +00:00
jb
3bda5008ec Define the target type for alpha. 1998-03-12 08:00:03 +00:00
jb
e625dba821 Add the alpha makefile.
Move tc-i386.c from Makefile to Makefile.i386 'cause alpha doesn't
like trying to swallow it. Indigestion, I think.
1998-03-12 06:51:48 +00:00
jb
442edc88f5 Change the include path for bfd.h to libbfd/${MACHINE_ARCH} since
I moved the location of that architecture specific file.
1998-03-12 05:59:22 +00:00
jb
97655cf34a This file was generated on i386, so it has been moved to the i386
sub-directory. It differs from the alpha version.
1998-03-12 05:31:34 +00:00
jb
6bb9456964 This file was generated on i386 by the update.sh script in
src/gnu/usr.bin/binutils.
1998-03-12 05:29:44 +00:00
jb
7bd0540058 These files were generated on alpha by the update.sh script in
src/gnu/usr.bin/binutils.
1998-03-12 05:26:30 +00:00
jdp
50d3710f6f Replace empty install targets with definitions of INTERNALLIB and
INTERNALSTATICLIB to suppress installation of internal libraries.
1998-03-12 05:14:19 +00:00
jb
8167eafab3 Change script to get the machine type from `uname -m' and make
the binutils headers for (machine)-unknown-freebsdelf.

Also copy the bfd.h header to an architecture specific directory
because there are two fundamental lines that differ (32-bit vs 64-bit)
between i386 and alpha.

The config.h for libbinutils generates the same on alpha as i386,
so I didn't change that (though I was tempted!).
1998-03-12 04:54:42 +00:00
jdp
9fc1bbbc87 Restructure the binutils hierarchy somewhat in order to better
support building it for variant architectures.  It was already
becoming clear that the former structure was too rigid and didn't
scale well.

The usual sort of makefile magic arranges to .include an architecture
specific makefile "Makefile.${MACHINE_ARCH}" in each directory
where it exists.  Also, sources will be found in each subdirectory
"${MACHINE_ARCH}" that exists.  This is all taken care of automatically
by the top level "Makefile.inc0".

This all seems to work right for the i386 now.  I have also converted
those alpha pieces already present to the new schema as best I
could.

Also: change the BINDIR on the i386 to /usr/libexec/elf for "ar"
and "ranlib".  They are not object format independent enough to
put into /usr/bin.
1998-03-12 02:55:43 +00:00
guido
6b4da9c835 mktemp -> mkstemp as pointed out on bugtraq
Obtained from: Theo de Raadt
1998-03-10 19:43:27 +00:00
peter
6516ee639e indicate ability to support the PerservePermissions stuff 1998-03-10 14:12:09 +00:00
peter
dcd62774c6 add new file (hardlink.c) into sources 1998-03-10 14:00:59 +00:00
jb
2c4ce4bfef We want ld in /usr/bin, not some weird and wonderful hiding place
that might be inspired by some creation from Intel. Doh.
1998-03-09 06:07:27 +00:00
jb
125facd7a9 This commit was generated by cvs2svn to compensate for changes in r34336,
which included commits to RCS files with non-trunk default branches.
1998-03-09 00:33:28 +00:00
jb
14511b916b Import of alpha specific bits to configure binutils for FreeBSD/Alpha.
Other changes that affect the i386-elf work are on hold to avoid
stuffing up other work in progress.
1998-03-09 00:33:28 +00:00
peter
3f6e19e69b Use cc -E rather than cpp when looking for __ELF__ 1998-03-08 17:25:10 +00:00
obrien
2cdcc81198 add CC' as a link to c++' for compatablity with SGI. 1998-03-08 12:27:04 +00:00
peter
df308e4a7b Set LIB_PATH explicitly otherwise genscripts makes (incorrect) references
all over the place.
1998-03-08 08:08:39 +00:00
peter
d60ffbf143 First round of changes to support generation of assembler for the old
a.out gas and the binutils gas (elf or a.out) with a single compiler.

This uses other infrastructure not yet committed, in order to support
both a.out and elf it needs to be able to get to both a.out and elf
gas, ld, libs, crt* etc.  So for now, the support is pretty much dormant.

The new freebsd.h file is based on the old freebsd-elf.h file (which has a
long lineage, right back through linux and svr4 files).  The change is
pretty dramatic from a gcc internals standpoint as it overrides a lot of
definitions in order to generate different output based on target mode.
There is potential for screw-ups, so please be on the lookout - gcc's
configuration mechanism wasn't really meant for this kind of thing.
It's believed to compile world etc just fine under both a.out and elf, can
handle global constructors and destructors, handles the differences in
a.out and elf stabs, and what sections things like exceptions go in.

The initial idea came from i386/osfrose.h which is a dual rose/elf format
target.  These two are not as diverse as a.out and elf it would seem.

The cc front-end uses external configuration to determine default object
format (still being thrashed out, so read the source if you want to see
it so far), and has a '-aout' and '-elf' override command line switch.
There are some other internal switches that can be accessed, namely -maout,
-mno-aout, -munderscores and -mnounderscores.  The underscore and local
symbol prefixing rules are controllable seperately to the output format.
(ie: it's possible to generate a.out without the _ prefixes on symbols and
also to generate elf with the _ prefixes.  This isn't quite optimal, but
does seem to work pretty well, except the linkers don't always recognise
the local symbols without their normal names)

The default format is a.out (still), nobody should see any major changes.

With both elf and a.out tools and libraries installed:

[1:26pm]/tmp-223> cc -elf -o hello hello.c
peter@beast[1:27pm]/tmp-224> file hello
hello: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked, not stripped
[1:27pm]/tmp-225> ./hello
hello world!

[1:27pm]/tmp-226> cc -aout -o hello hello.c
[1:27pm]/tmp-227> file hello
hello: FreeBSD/i386 compact demand paged dynamically linked executable not stripped
1:27pm]/tmp-228> ./hello
hello world!

Since my co-conspirators put a lot of effort into this too, I'll add them
so they can share the blame^H^H^H^H^Hglory. :-)

Reviewed by: sos, jdp
1998-03-08 05:29:49 +00:00
wosch
b728109806 Delete cc(1) debug option, typo from last commit.
Pointed out by: Søren Schmidt
1998-03-07 16:13:57 +00:00
bde
5eb504656a Use foo/bar.a' instead of -Lfoo -lbar' for linking to static internal
libraries so that `ld -f' in can create correct dependencies for
yet-to-be-built libraries.

Get the default BINDIR correctly (by including ../Makefile.inc recursively.
1998-03-07 09:46:17 +00:00
bde
05b2adffff Use foo/bar.a' instead of -Lfoo -lbar' for linking to static internal
libraries, so that `ld -f' in can create correct dependencies for
yet-to-be-built libraries.
1998-03-07 08:55:00 +00:00
guido
f2be303d75 Open temporary files with O_EXCL.
Obtained from:bugtraq
1998-03-06 19:00:26 +00:00
bde
75ec8a3d0b Fixed `make -jN' for large N. The usual method of pretending that all
objects depend on all generated headers doesn't work because it gives
cyclic dependencies.  Give enough dependencies explicitly.  We no
longer need to use .SINGLESHELL for `make depend'.  .SINGLESHELL was
more of a bottleneck than usual because `make depend' makes everything.

Fixed some spelling and English errors.
1998-03-06 13:34:36 +00:00
bde
e411f3a998 Fixed `make -jN' for large N. Just put the generated headers in
${SRCS} instead of giving inadequate explicit dependencies.  There
is still a problem after `make depend; make clean'.  Then `make'
barely works, and `make -jN' is confused by absolute paths in
.depend.
1998-03-06 13:13:15 +00:00
jdp
9b37bc13df Fix the broken installation of strip. It tried to use the installed
strip program (via "install") to strip itself.  But the program
wasn't executable because "install" hadn't made it so yet.  I
borrowed the method used for the old strip to get around this.
1998-03-06 00:28:04 +00:00
jdp
3be3aa3a83 This commit was generated by cvs2svn to compensate for changes in r33975,
which included commits to RCS files with non-trunk default branches.
1998-03-01 23:41:17 +00:00
jdp
8222bc81a2 Add bmakefiles for building binutils from the contrib tree.
This finishes up the binutils import.  But I am leaving it disabled
in "src/gnu/usr.bin/Makefile" for now.  It is not used by anything
yet, so I'll take this opportunity to run one more round of tests
before enabling it.
1998-03-01 23:41:17 +00:00
steve
f4ab860453 Build perl header files for machine/* too.
PR:		672
Submitted by:	Jun Kuriyama <kuriyama@opt.phys.waseda.ac.jp>
1998-02-21 04:06:24 +00:00
jkh
46df9e32e2 Correct spammage from MACHINE_ARCH commit - you don't want to
*replace* the SUBDIR list in that case, you want to augment it.
Also move a stray .endif to its proper location.  Heh, no wonder my
release builds were falling over! ;)
1998-02-20 16:14:37 +00:00
bde
53190093b4 Don't create an unused obj directory. 1998-02-20 11:18:57 +00:00
jb
6a4c0d5afa No binutils yet 8-(, and a few programs that need porting to alpha.
Make them i386 specific for now.
1998-02-19 09:34:59 +00:00
steve
7a321c3428 The ' character is treated differently as the first character of a line.
PR:		5754
Submitted by:	Kazuo Horikawa <k-horik@yk.rim.or.jp>
1998-02-15 17:03:58 +00:00
bde
e959faf3eb Fixed printing of %fs and %gs for live kernels.
Only print the current pcb on startup.  Printing it every time a utility
routine was called messed up the register dump for live kernels.
1998-02-13 02:45:26 +00:00
alex
3d32fd0387 catman(1) is now invoked by /etc/periodic/weekly/330.catman. 1998-02-07 05:17:47 +00:00
jdp
a1b356b0ca Implement dladdr. 1998-02-06 16:46:46 +00:00
danny
5a14da0288 Submitted by: Alex Nash
Style nit - extraneous space.
1998-02-04 07:04:44 +00:00
steve
8088468559 setpwent and endpwent have a return type of void, so change this
to work like newer versions of perl.

Reviewed by:	Bruce Evans
1998-02-01 22:04:49 +00:00
peter
73c1b2e16a comment that pvcs_to_rcs is left out since it needs perl5 1998-01-26 04:33:03 +00:00
peter
a4486bf67a Add libdiff 1998-01-26 04:21:52 +00:00
peter
5bedf7ec33 Build the internal libified diff 1998-01-26 04:14:21 +00:00
peter
620564a0e1 Update options.h as per configure generated version 1998-01-26 04:02:05 +00:00
peter
8f8152b202 Update config.h 1998-01-26 03:59:21 +00:00
jb
dee462b2ca Make machine dependent asm code machine dependent. 8-) 1998-01-25 09:52:32 +00:00
jb
05144535f3 Change MACHINE -> MACHINE_ARCH so that the design make sense on those
machines where the processor chip determines the compiler, and where
multiple machines use the same architecture.
1998-01-25 09:49:00 +00:00
ache
227920f6c8 Add PATCH_INDEX_FIRST environment variable to do the same as -I option 1998-01-22 07:44:04 +00:00
ache
2e6f80745a Update usage line with new option 1998-01-21 15:15:39 +00:00
ache
6fd41542aa Add -I or --index-first option to take Index: precedence over context diff,
as it was in hacked FreeBSD version
1998-01-21 15:10:14 +00:00
ache
50208af7e1 Resurrect patch 2.1 without FreeBSD Index: hack 1998-01-21 14:37:27 +00:00
bde
b2fde7f60d Fixed accesses to addresses between VM_MAXUSER_ADDRESS (normally
0xefbfe000) and kernel_start (normally 0xf0100000).

Things are unnecessarily (?) difficult because procfs is used to
access user addresses in the live-kernel case although we must have
access to /dev/mem to work at all, and whatever works for the
dead-kernel case should work in all cases (modulo volatility of
live kernel variables).  We used the wrong range [0, kernel_start)
for user addresses.  Procfs should only work up to VM_MAXUSER_ADDRESS,
but it bogusly works for reads up to the address 2 pages higher
(the user area, including the kernel stack, is mapped to where the
user area used to be (WTUAUTB)).  Procfs can not work at all for
addresses between WTUAUTB and kernel_start.

Now we use procfs only to access addresses up to VM_MAXUSER_ADDRESS.
Higher addresses are translated normally using kvtophys(), so the
user ptd is used for addresses below the real kernel start (0xf0000000;
see INKERNEL()) and nothing is found WTUAUTB.

Strange accesses that cross the user-kernel boundary are now handled,
but such ranges are currently always errors because they necessarily
overlap the hole WTUAUTB.

Short reads are still not handled.
1998-01-19 15:27:56 +00:00
bde
60aa5ea7f4 Removed `kstack' and associated mistranslations in kvtophys().
Correct translations would have been null.  However, kstack was
the top of the kernel stack instead of the base of the kernel stack
like it was when the kernel exported it, so the area above the
kernel stack was mistranslated and the kernel stack was not
translated.  This bug was depended on to compensate for the wrong
value of kstack - to read the pcb, instead of just using the address
of the pcb, we used the mistranslated address of kstack, which
happened to be the same (curpcb = kstack - 0x2000).

This area is simpler than it used to be now that the kernel stack
address is per-process.  The code still seems to be more complicated
than necessary - the `found_pcb == 0' case seems to be unused.
1998-01-19 14:27:41 +00:00
bde
b111406bb8 Fixed endless loop for `p/x *(int *)0xf0000000'. kvm_uread() in
gdb was cloned from the buggy version of kvm_uread() in libkvm and
had the same bugs.  It looped endlessly on EOF and checked errno
without setting it in the lseek() error check.  The first bug caused
gdb to loop endlessly for reads from addresses between the end of
the user area and the start of the kernel text.  kvm_uread() should
not be used for addresses beyond the end of the user area, but is
due to bugs elsewhere.
1998-01-18 13:18:55 +00:00
bde
4428561879 Don't override FRAME_CHAIN(). If the current frame is valid, then
the previous frame is in the usual place even for traps, interrupts
and syscalls in the kernel, because the assembly language stubs
don't change the frame pointer.  The previous frame is just not for
the calling function.  We may as well depend on this as on magic to
determine the trap frame address.  The magic is in FRAME_SAVED_PC()
which elides the correct number of stubs (1) to go back to a pc that
matches the previous frame.

Removing fbsd_kern_frame_chain() fixes bugs in it.  Xsyscall was
misspelled as _Xsyscall (gdb removes one leading underscore), so
the tf_syscall frame type was never found.  This was harmless
because tf_normal works in all cases in fbsd_kern_frame_chain()
and Xsyscall is spelled correctly in fbsd_kern_frame_saved_pc()
where it matters.  There were style bugs on almost every line,
starting with a primary indent of 7.
1998-01-18 12:35:48 +00:00
bde
e95ae06aaf Fixed sloppy definitions of SIGTRAMP_START and SIGTRAMP_END. The old
range was a little too large.
1998-01-18 11:51:48 +00:00
bde
4d40d6d2f0 Pass the system name to dmesg. Rev.1.7 only works when the symbols in
/kernel aren't too different form those in the kernel being debugged.
1998-01-17 17:07:53 +00:00
jb
0a1cfbad41 More i386 -> ${MACHINE} changes to make this Makefile machine
independent. It makes it look like you can get aout on alpha, but
that's just your imagination. The makefile above gives you no choice.
1998-01-11 04:13:25 +00:00
jb
5c5ed3424a Replace i386 references with ${MACHINE} to make this makefile almost
machine independent, with the only dependency being the binary format
to build. We only expect to build ELF on alpha although we'll need
ECOFF compatibility with Digital Unix.
1998-01-11 04:10:26 +00:00
cvs2svn
bb3dd863de This commit was manufactured by cvs2svn to create branch 'JB'. 1998-01-10 23:00:07 +00:00
jdp
0a829f3d76 Make the ".set" directive copy the aux field when the expression
reduces to a relocatable symbol plus an offset.  This preserves
the symbol type information (function vs. object).  It is important
for SVR4-style weak symbols, e.g., "#pragma weak foo=bar".  Without
this change, the linker complains that the jmpslot entry is not a
function.
1998-01-10 05:36:35 +00:00
danny
03142f9572 PR: gnu/4385
Submitted by:	Robert Eckardt <roberte@MEP.Ruhr-Uni-Bochum.de>
Sundry man page fixes; handle Central European Summer Time (CEST);
usage fixes in line with man page fixes.
1998-01-05 11:32:39 +00:00
ache
5b1f0e3880 Upgrade to 2.5 (contrib version) 1998-01-04 21:41:46 +00:00
ache
ec3e46c5d5 Back out Index over +++/--- precedence.
It maybe right, if patch was FreeBSD-own program, but it break compatibility
with pre-existent patches in other systems.
The example is big ncurses patch which don't apply on FreeBSD
due to "fixed" precedence.
1998-01-03 23:42:56 +00:00
alex
497c80cacc Removed /etc/ld.so.conf reference from FILES section (people get
confused when they can't find it), but leave the reference to it
as being a standard filename (which doesn't imply that it exists).

Discussed with:	jkh
1998-01-01 02:31:47 +00:00
danny
e6c4a1774f Submitted by: Peter Hawkins <peter@clari.net.au>
Actually implement --norecurse as documented in the man page.
1997-12-30 10:23:09 +00:00
wosch
3438178e6b Check argument filename length before copying.
$ gzip `perl -e 'for(1..10240){ print "a"}'`
1997-12-27 03:38:39 +00:00
wosch
5f044fec7f Workaround to avoid a strange core dump.
gzip < /dev/null | perl -npe 's/\003\003/\003\225/' | gzip -d
1997-12-26 21:12:26 +00:00
wosch
f9af59beb5 Do not install the z*grep man pages if grep was linked with -lz. 1997-12-26 01:53:58 +00:00
hoek
b298ef3a0e Use consistent spelling,
writeable -> writable (recall prior debate over this? :-)
	initialise -> initialize
	recognise -> recognize

Merry Christmas! :)
1997-12-25 09:36:42 +00:00
wosch
8c245bff91 When called as `zgrep', the -Z argument is assumed. Make a
link from zgrep to grep.

Pointed out by: Tim Vanderhoek <hoek@hwcn.org> and
                Mike Smith <mike@smith.net.au>
1997-12-21 19:15:12 +00:00
wosch
9355c8c128 Added zgrep.libz. This version of zgrep(1) depend on a
grep(1) linked with libz.
1997-12-20 19:20:33 +00:00
wosch
9cba0d1965 Added a sparc category to the list. 1997-12-20 18:54:22 +00:00
wosch
b646b1b4f8 Added builtin decompression using zlib library, option -Z.
Enabled this new feature with the makefile variable GREP_LIBZ. If
you don't like it, compile with `make GREP_LIBZ='.

grep + zlib has several advantages:

- the shell script zgrep(1) will be basically a one line
  exec grep -Z "$@"

- no shell script, no bugs. The current zgrep implementations
  have many bugs and some grep options are no supported.

- no shell script, no security risks.

- it is a magnitude faster than a shell script

Also fixed:
0 -> STDIN_FILENO
Close a file descriptor only if the open call was successfully. It does
not hurt for the open(2) function, but the gzclose(3) function
died in free() to free up (not) allocated memory.
1997-12-20 18:46:09 +00:00
bde
e03e3017e5 Exec dmesg and awk to print everything in the message buffer
following "panic:" or "Fatal trap".  `panicstr' is still printed,
although it is redundant if there is a valid message buffer and
incomplete if it contains `%'s.  I think the awk command belongs
here and not in a script since a standard format with complete
messages is good for bug reports.
1997-12-19 21:37:18 +00:00
bde
3711589b3a Fixed missing dependency on version.c.
Fixed some style bugs ($@ is not recommended ...).
1997-12-18 15:22:12 +00:00
bde
c6e9fad577 <bsd.prog.mk> has always included ../Makefile.inc, and there are no
complications involving .PATH or dependencies, so don't include it here.
1997-12-17 20:22:34 +00:00
bde
61453b7bc9 <bsd.prog.mk> has included ../Makefile.inc for a long time, and there
are no complications involving .PATH or dependencies, so don't include
it here.
1997-12-17 19:57:35 +00:00
bde
a947da7732 Don't use LDDESTDIR. Just put the -L arg in LDADD. 1997-12-17 15:11:43 +00:00
bde
757f96092a Use BINOWN, etc. instead of bin, etc. so that (this part of)
`BINOWN=... make world' can be run by users other than root.
1997-12-17 12:04:53 +00:00
wosch
d431f0707e Use getopts instead getopt(1). This should fix the problem
with whitespaces in pattern.
PR:	5211
1997-12-07 01:00:56 +00:00
jdp
310123882b Make emacs work again. This is a workaround for the fact that the
emacs a.out file, self-generated by emacs's "unexec" function in
"unexsunos4.c", is invalid.  In particular, its "_end" symbol has
the wrong value.  The dynamic linker was using the value of that
symbol to initialize its sbrk break level.

The workaround is to peek at the executable's a.out header in
memory, and calculate what "_end" should be based on the segment
sizes.

I will work out a fix for emacs and send it to the FSF.  This
dynamic linker workaround is still worthwhile, if only to avoid
forcing all emacs users to build a new version.

Note: xemacs gives a bogus warning at startup, for related reasons.
The warning is harmless and can safely be ignored.  I will send a
patch to the xemacs maintainers to get rid of it, and meanwhile
add a patch file to our port.
1997-12-05 02:06:37 +00:00
steve
f446d66964 Remove manpath.[ch] here and use the ones in ../manpath instead. 1997-11-30 20:08:27 +00:00
steve
d135b08938 Resurrect manpath.c here. 1997-11-30 19:55:16 +00:00
steve
08e25496a9 Remove this copy of manpath.c and add the .PATH directive to get to
the same file in ${.CURDIR}/../man.

Suggested by:	Bruce Evans
1997-11-30 17:17:29 +00:00
steve
40c3a04c7e Always call gripe_reading_mp_config with the required arguments.
PR:		3894
Submitted by:	Stephen Clawson <sclawson@marker.cs.utah.edu>
1997-11-30 01:01:47 +00:00
jdp
472128bc3f Get rid of the dynamic linker's internal malloc package, and arrange
things so that it uses the same malloc as is used by the program
being executed.  This has several advantages, the big one being
that you can now debug core dumps from dynamically linked programs
and get useful information out of them.  Until now, that didn't
work.  The internal malloc package placed the tables describing
the loaded shared libraries in a mapped region of high memory that
was not written to core files.  Thus the debugger had no way of
determining what was loaded where in memory.  Now that the dynamic
linker uses the application's malloc package (normally, but not
necessarily, the system malloc), its tables end up in the regular
heap area where they will be included in core dumps.  The debugger
now works very well indeed, thank you very much.

Also ...

Bring the program a little closer to conformance with style(9).
There is still a long way to go.

Add minimal const correctness changes to get rid of compiler warnings
caused by the recent const changes in <dlfcn.h> and <link.h>.

Improve performance by eliminating redundant calculations of symbols'
hash values.
1997-11-29 03:32:48 +00:00
jdp
328fbd53d1 In the "ldd -v" output, display the N_AUX information for each
symbol.  It indicates whether the symbol refers to a function or a
data object.
1997-11-28 19:34:27 +00:00
bde
c6f91d8591 Implemented "info float" for core files.
Implemented reading of %fs and %gs from core files.

Print weird floating point values better.  We have to convert long
doubles to doubles here because of limitations and bugs in printf()
and floatformat_to_double() (long doubles aren't really supported
and naive converion to double causes exceptions).  Conversion loses
information about weird formats (everything becomes a quiet NaN),
and printf() doesn't know about different types of NaNs anyway.
1997-11-23 09:18:18 +00:00
jdp
e2d907a81b Add missing argument detected by "-Wformat". 1997-11-18 03:37:45 +00:00
ache
efe576f0e2 Define PR_PROGRAM properly 1997-10-29 17:35:54 +00:00
ache
122c53d6ae Switch to contrib version 1997-10-29 16:58:20 +00:00
ache
f1e51242fc Switch to contrib version 1997-10-29 16:50:42 +00:00
ache
e628096b3f Switch to contrib version 1997-10-29 16:36:57 +00:00
jraynard
bc16578d00 Remove yet another superfluous file. 1997-10-26 12:53:16 +00:00
ache
1d9f100cc7 Add -funsigned-char to CFLAGS (for ctype macros) 1997-10-26 12:20:45 +00:00
ache
5ce5d17f71 Add (unsigned char) cast to ctype macros 1997-10-23 02:44:23 +00:00
ache
5974a198b1 Add (unsigned char) cast to ctype macros 1997-10-23 02:22:51 +00:00
ache
e3923fe171 Add unsigned char cast to ctype macros 1997-10-23 02:08:16 +00:00
ache
fb5a9147db Add (unsigned char) casts to ctype macros 1997-10-23 01:43:00 +00:00
ache
53944ea82d Do not use gawk random, we have better one in libc 1997-10-15 14:01:31 +00:00
jraynard
adb8ef2dbb Makefile for contributed version of awk. 1997-10-14 18:32:38 +00:00
jraynard
5dad8d6418 Remove old version of awk. 1997-10-14 18:29:32 +00:00
peter
8f2d47fd2f #include <machine/tss.h> explicitly 1997-10-10 12:53:27 +00:00
peter
afa87c27bc If kerberos is installed and enabled in make.conf, activate cvs's kserver
hooks.  This is a lot safer than 'cvs pserver'.
1997-10-10 04:03:17 +00:00
jkh
068b44c29a Changes to support full make parallelism (-j<n>) in the world
target.
Reviewed by:	<many different folks>
Submitted by:	Nickolay N. Dudorov" <nnd@nnd.itfs.nsk.su>
1997-10-05 09:40:24 +00:00
joerg
9d0f984135 Nevermind... Wolfram already did it, but added the file (IMHO wrong)
to the contrib area so i didn't see it.
NB: RELENG_2_2 is still missing it (what's why i didn't see it in the
first place).
1997-09-29 14:27:55 +00:00
joerg
43cfca285a Add a stub man page for psroff(1). 1997-09-29 14:24:35 +00:00
phk
7d1a30911b Many places in the code NULL is used in integer context, where
plain 0 should be used.  This happens to work because we #define
NULL to 0, but is stylistically wrong and can cause problems
for people trying to port bits of code to other environments.

PR:		2752
Submitted by:	Arne Henrik Juul <arnej@imf.unit.no>
1997-09-18 14:08:40 +00:00
joerg
70d3e6bc27 Sigh, there's always one more buffer overflow. :-(
This one hinted to by the recently posted exploit (although not exploited by
it).
1997-09-16 08:33:52 +00:00
wosch
1f1f27f863 Add a genclass.1 manpage. 1997-09-15 19:18:59 +00:00
wosch
8ebcad6b2f Add a simple manpage. 1997-09-15 16:08:56 +00:00
ache
3ad3d57009 Fix neqn building:
1) Move it after Makefile.inc included since it uses DIST_DIR from there
2) Add neqn.sh dependance
1997-09-15 01:56:29 +00:00
wosch
426c96ab6c Add a simple manpage. 1997-09-14 23:43:22 +00:00
wosch
07b6e5147d spelling corrections.
PR: docs/4450
Submitted by: josh@quick.net
1997-09-13 16:01:53 +00:00
jdp
5e90835a82 Touch up the code that implements "ldd -v".
Bring the style of sods.c into better conformance.  Add code to
print the contents of each datum being relocated.  Correct the logic
that distinguishes between programs, shared libraries, and object
files.  Make the entire program "-Wall" clean.
1997-09-02 21:54:39 +00:00
jmg
fe87b6f70d fix a few spelling changes
Submitted by: Josh Gilliam

Closes PR's: 4429, 4431-4438

PS: He has agreed to submit all contrib fixes back to the original author.
1997-08-30 12:22:49 +00:00
jmg
6aed4cc4a1 fix misspelling
Submitted-by: Josh Gilliam

Closes PR:4426
1997-08-30 11:08:06 +00:00
sos
76b198e98c Dont use an internal function called warn it clashes with libc.
Allows ELF compile.
1997-08-29 16:14:20 +00:00
obrien
6b99c9e610 Real skeleton manpage for install-info
(someone that actually knows what it really does (I don't use info) really
should try to put some meat in this)
1997-08-29 09:10:22 +00:00
joerg
baa22d6b37 Major Ooops. I've overlooked a few calls to scanident() in my last commit.
Submitted by:	rbezuide@oskar.nanoteq.co.za (Reinier Bezuidenhout)
1997-08-27 17:18:30 +00:00
steve
84a8bd7346 .Ar -l -> .Fl l
PR:		docs/3682
Submitted by:	Kazuo Horikawa <k-horik@yk.rim.or.jp>
1997-08-23 21:59:41 +00:00
steve
4ad50a12fe Add missing *roff macros to correct display about -V option.
PR:		docs/4162
Submitted by:	Kazuo Horikawa <k-horik@yk.rim.or.jp
1997-08-23 15:50:53 +00:00
jmg
bf3a77d286 bin to BIN{OWN,GRP} and add Id line 1997-08-23 05:26:32 +00:00
peter
4f15f936e5 Fix missed optimisation in "Attic/" stripping code in $CVSHeader$
Submitted by: jdp
1997-08-22 06:59:08 +00:00
peter
8c84d7f2cc Add -R (rescan or refresh) option to rescan and rebuild the hints
file based on the previous list of directories stored there which
should overcome a weakness of the '-m' switch which can only add
libs.  This is an ideal way of updating the hints list after adding
or removing a shlib since it will remove entries that are gone and
doesn't need to have all the directories spelled out each time.
(eg: rm -f /usr/lib/libtcl75*; ldconfig -R)  This only works for
version 2 hints files (which we've been generating for a year or
so) which store the path.
1997-08-22 04:42:12 +00:00
obrien
cfa4659fd7 Added to RELENG_2_2 via tagging. 1997-08-21 08:26:55 +00:00
jmg
08fa52f6b5 change bin to BINOWN and BINGRP
Reviewed-by: joerg
1997-08-21 03:28:07 +00:00