Commit Graph

1281 Commits

Author SHA1 Message Date
John Birrell
221a97c194 Although the entire src tree builds cleanly now without -fno-strict-aliasing
in the default CFLAGS, we're in the middle of a ports freeze, so we can't
really go making the corresponding change to the ports mk files.

I'll take -fno-strict-aliasing out again when the ports freeze ends.
2007-11-26 21:46:21 +00:00
John Birrell
cfb5b3256b Re-enable -Werror again.
This time, change the default CFLAGS to match the simple defaults that
the tinderboxes use. That is, don't use -fno-strict-aliasing by default.

My last attempt to re-anable -Werror gave me a lesson in what strict
aliasing is all about. There was code in libthr that wasn't 64-bit clean.
The default use of -fno-strict-aliasing hid that.

By using -fno-strict-aliasing by default we were choosing to ignore
problems in code which had the potential to shoot ourselves in the
foot. Sometimes it would be the 64-bit foot. I have both feet. The left
ones are 32 bits and the right ones are 64 bits. Don't ask about my
endian orientation. :-)

The -fno-strict-aliasing compiler arg can still be used if NO_STRING_ALIASING
is define in make.

We are early in the FreeBSD 8 development, so we have the opportunity to
wait and see if this works for us. I am sure that people will complain.
We can easily revert this. All I ask is that we take sides: clean code or
not. YMMV.

Note that by using -fno-strict-aliasing the build won't actually break.
Only where WARNS is set (and -Werror is used) will a compiler warning break
the build. The use of WARNS levels implies (to me at least) that the
developer has taken some care to make the code pass basic checks. This
commit makes those checks just a little bit more strict.
2007-11-22 23:21:12 +00:00
John Birrell
f9f50330f3 Unfortunately the tinderbox setup uses custom CFLAGS which are a big
obstacle to enabling -Werror. I'll continue to work on cleaning up the
code so that we can keep this enabled.

If the tinderboxes would just use the default CFLAGS set in this file,
all would be fine and we'd be able to make use of -Werror.
2007-11-19 22:39:39 +00:00
John Birrell
76f9e2ec8f Re-enable -Werror ins WARNS as it was roughly 6 months ago before
being disabled while gcc 4.2 was bedded in.

Tested with 'make release' (amd64 arm i386 ia64 pc98 powerpc sparc64 sun4v)
2007-11-19 09:09:02 +00:00
John Birrell
c117aee58e Weed out a warning argument that isn't applicable to C++ code. 2007-11-19 09:01:58 +00:00
Olivier Houchard
cdc162fe0e Switch arm to -O until the -O2 issues are resolved.
MFC After:	3 days
2007-11-05 23:08:34 +00:00
Yaroslav Tykhiy
a39cea66f4 Allow the shell used by make(1) to be changed early via the
__MAKE_SHELL variable.  This feature isn't supposed to be in wide
use, but it's needed now to make `installworld' independent of the
stock binaries and libs so that radical ABI changes can go in safely.

Reviewed by:	ru
2007-10-27 18:40:34 +00:00
Ruslan Ermilov
4f6d329f1e - Convert NO_INSTALLLIB option to a new syntax: makefiles should
test MK_INSTALLLIB, users can set WITHOUT_INSTALLLIB.  The old
  NO_INSTALLLIB is still supported as several makefiles set it.

- While here, fix an install when instructed not to install libs
  (usr.bin/lex/lib/Makefile).

PR:		bin/114200
Submitted by:	Henrik Brix Andersen
2007-10-20 19:01:50 +00:00
Ruslan Ermilov
2e0a54d6c0 Align the warning message with the one in bsd.own.mk. 2007-10-20 18:46:15 +00:00
Yaroslav Tykhiy
479f84ca4d Explicitly verify if we have found the VERSION_GEN script
instead of passing the possibly null argument to awk(1) and
getting an obscure error from it.
2007-10-18 15:21:35 +00:00
Yaroslav Tykhiy
91fb7b9b19 Distinguish the cases when a dup symbol is in different versions
(evil, needs a error) or in the same version (harmless, deserves
a mere warning).

Noticed by:     grehan@, tinderbox
2007-10-18 10:32:28 +00:00
Yaroslav Tykhiy
39d5a8ffea MFp4:
- Check for duplicated symbols and suggest moving them to ObsoleteVersions.
- Improve and unify error handling.
- Make the regular expressions more uniform, robust, and less sensitive
  to harmless variations in the input such as those to whitespace amount.

Reviewed by:	deischen
Tested with:	md5 (Version.map files in /usr/obj stay the same)
2007-10-17 20:09:56 +00:00
Olivier Houchard
4251babd0a Backout rev 1.62, and revert to use -march=armv5te -D__XSCALE__ instead
of -mcpu=xscale for XScale.
gcc still has issues with -mcpu=xscale, and now crashes while building
systat.

Reported by:	sam
MFC After:	3 days
2007-10-16 18:32:37 +00:00
Ruslan Ermilov
64965b5788 Though it was possible to configure our BIND to build even when
libpthread support isn't present, our maintainer felt it's an
overkill, so instead enforce the BIND dependency on libpthread.
2007-10-12 08:03:51 +00:00
David E. O'Brien
946367b8e2 Tweak the handling of "WITHOUT_LIBPTHREAD". Also remove the accidental
treatment of 'LIBKSE' as an "old style" knob.

Submitted by:	ru
Approved by:	re(kensmith)
2007-10-09 23:31:11 +00:00
David E. O'Brien
65c045e964 Repo copy libpthreads to libkse.
This introduces the WITHOUT_LIBKSE nob,
and changes WITHOUT_LIBPTHREADS to mean with neither threading libs.
Approved by:	re(kensmith)
2007-10-09 13:42:34 +00:00
Ruslan Ermilov
71ce49ae8d Fixed "make checkdpadd" (missing library dependencies).
Approved by:	re (kensmith)
2007-10-01 18:15:11 +00:00
Xin LI
179dc282b4 Restore -O2 optimization after gcc 4.2.1 import, which has
fixed the issue raised by gcc 4.2.0.

Tested with:	test case found in gcc bug 32500
Approved by:	re (kensmith), ache, kan
2007-08-14 13:44:08 +00:00
Alexander Kabaev
9f40824852 Put local symbol suppression rule into most recent (e.g. last) version
block.

Approved by:	re (kensmith)
2007-07-21 20:52:32 +00:00
Andrey A. Chernov
5f308feb93 Switch to "-O1 -pipe" as cross-build compatible gcc workaround.
"Looks like Alexander chimed in with "I'm comfortable with that until we
can import a fixed GCC"."

Approved by:	re (kensmith)
2007-07-01 11:51:06 +00:00
Andrey A. Chernov
cf7e2eb063 Back out gcc workaround per re@ request. Details:
"There seems to be some continuing discussion about how this is best fixed,
and we'd like to get Alexander (as our gcc guru) to opine on a final
solution before picking one.  In the mean time, could you back out the
original commit (sys.mk:1.89)?"

Approved by:	re (rwatson)
2007-06-28 09:25:47 +00:00
Remko Lodder
4907faa674 Make zoneinfo optional so that a filesystem upgrade/update does not overwrite
possibly installed thirdparte zoneinfo databases (from ports for example).

PR:		bin/104713
Submitted by:	Mark Andrews <Mark_Andrews at isc dot org> (original patch
		rewritten by me to be more consistent with the new practise).
Approved by: 	re (kensmith)
Approved by:	imp (mentor)
Reviewed by:	ru (some time ago already)
2007-06-26 19:40:03 +00:00
Andrey A. Chernov
3f5b2c267b This is temp workaround of nasty gcc 4.2.0 -O2 bug which may skip the rest
of the loop when arrays used inside.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32500

Approved by:    re (kensmith)
2007-06-26 19:10:20 +00:00
Stephane E. Potvin
04031e9ae2 Options spring cleanup:
- Add and document the KVM and KVM_SUPPORT options that
are needed for the ifmcstats(3) makefile
- Garbage collect unused variables
- Add missing inclusion of bsd.own.mk where needed

Approved by: kan (mentor)
Reviewed by: ru
2007-06-13 02:08:04 +00:00
Pav Lucistnik
ed88f73921 Break long line
Submitted by:	ru
2007-06-01 15:32:23 +00:00
Pav Lucistnik
e61e798b8c Add bsd.port.options.mk, a stub to include parts of bsd.port.mk that handle
OPTIONS resolving. This will allow us to load bsd.port.mk in port Makefiles in
three steps (options, pre, post), allowing us to manipulate USE_* flags
conditionally on OPTIONS values.

With hat:	portmgr
Reviewed by:	ru
MFC after:	1 week
2007-06-01 15:17:51 +00:00
David E. O'Brien
9eef6e338b Temporarily add 'WITH_GCC3' that removes -Wno-pointer-sign from the
compiler invocation.  This is just to help get over the hump of people
tracking down bugs that may cross the GCC 4.2 upgrade.
It is envisioned that this option goes away after a suitable amount
of time.
2007-05-24 21:53:42 +00:00
Ruslan Ermilov
dc9f26d3c3 Style: remove redundant parentheses. 2007-05-21 09:01:23 +00:00
Olivier Houchard
ecf7ac028b GCC doesn't segfault anymore while building world with -mcpu=xscale, so use it. 2007-05-21 08:39:44 +00:00
Alexander Kabaev
36aa6a9be5 Introduce WITHOUT_SSP option that allows users to exclude LGPLed
libssp from the build.
2007-05-19 04:42:59 +00:00
Alexander Kabaev
d9e2d1a3b5 Universally disable -Werror until src/ is in better shape for GCC 4.2.
There are new warnings that kill the build otherwise.

Disable pointer destination sign mismatch warning alltogether. Our tree
is in no shape to have that enabled yet.
2007-05-19 04:41:05 +00:00
Daniel Eischen
00fb440c1a Enable symbol versioning by default. Use WITHOUT_SYMVER to disable it.
Warning, after symbol versioning is enabled, going back is not easy
(use WITHOUT_SYMVER at your own risk).

Change the default thread library to libthr.

There most likely still needs to be a version bump for at least the
thread libraries.  If necessary, this will happen later.
2007-05-13 14:12:40 +00:00
Daniel Eischen
06097b1060 Use CPP to preprocess version map files so we can conditionalize symbols. 2007-04-29 14:00:58 +00:00
Daniel Eischen
6f91e7a3af When generating the version map file, order versions oldest
first to make it easier for rtld to choose the oldest version
of a symbol.

Sumbitted by:	kan
2007-04-23 03:24:33 +00:00
Pawel Jakub Dawidek
834236916f Oops, keep things sorted.
Found by:	ru
2007-04-06 10:33:06 +00:00
Pawel Jakub Dawidek
ceef0c312c Connect ZFS to the build. 2007-04-06 02:13:30 +00:00
Pawel Jakub Dawidek
f13a826083 Add new libraries. We may want to rename libumem to not colide with
ports/devel/umem.
2007-04-06 01:45:23 +00:00
Alexander Kabaev
844b016555 Add entry for bsd.symver.mk.
Pointed out by: ru
2007-04-03 20:15:59 +00:00
Alexander Kabaev
2da4e4706d Break out Version.map generation code from bsd.lib.mk into a
separate bsd.symver.mk file. Include bsd.symver.mk in bsd.lib.mk
to maintain the status quo.
2007-04-03 18:56:05 +00:00
Ruslan Ermilov
5b83a06c72 Stop clobberring the application namespace with local
variables such as "sect", "page", and "target"; use
underscored versions instead.

Discussed with:	kan
MFC after:	3 days
2007-03-12 13:54:52 +00:00
Rong-En Fan
31b4134f7b Enable ncurses wide character support
Approved by:	delphij (mentor)
Tested by:	kris on pointyhat (early version), current@
2007-03-09 12:11:58 +00:00
Rong-En Fan
438e97c073 Remove old libmytinfo link.
Approved by:	delphij (mentor)
Requested by:	ache
2007-02-01 08:45:27 +00:00
Xin LI
9a9ea25f4a Replace the GNU gzip with a slightly modified NetBSD gzip. The
NetBSD version is a feature-to-feature re-implementation of GNU
gzip using the freely-redistributable zlib and this version is
expected to be mostly bug-to-bug compatible with the GNU
implementation.

 - Because this is a piece of mature code and we want to make
   changes so it is added directly rather than importing to
   src/contrib.
 - Connect newly added code to src/usr.bin/ and rescue/rescue
   build.
 - Disconnect the GNU gzip code from build for now, they will
   be eventually removed completely.
 - Provide two new src.conf(5) knobs, WITHOUT_BZIP2_SUPPORT and
   WITHOUT_BZIP2.

Tested by:	kris (full exp-7 pointyhat build)
Approved by:	core (importing a 4-clause BSD licensed file)
Approved by:	re (adding new utility during -HEAD code slush)
2007-01-26 10:19:08 +00:00
Dag-Erling Smørgrav
ba518d666a "If I only had a brain..."
MFC after:	 3 weeks
2007-01-17 14:54:53 +00:00
Dag-Erling Smørgrav
5e0d38b538 Correct errors in previous commit. I didn't realize that ${CPUTYPE} is
passed unmodified to gcc.  Therefore, "prescott" should be used for Prescott,
Nocona, Core and Core 2 CPUs when building 32-bit code, and "nocona" should
be used for Prescott, Nocona and Core 2 CPUs when building 64-bit code.

MFC after:	3 weeks
2007-01-17 14:49:13 +00:00
Dag-Erling Smørgrav
3f15422a91 On i386, make "prescott" an alias for "nocona" (instead of the other way
around), and introduce "core", along with the alias "core2".  All of these
enable SSE3.

On amd64, add "core2" (enables SSE3).

MFC after:	3 weeks
2007-01-17 12:43:06 +00:00
Ruslan Ermilov
8ef03c79e1 Try harder to not leak src/ build stuff into ports/ environment
by not exposing the MK_* variables that were designed for src/.

Requested by:	many
2006-11-19 16:28:52 +00:00
Olivier Houchard
507a594e15 Change one more ARM_BIG_ENDIAN to TARGET_BIG_ENDIAN. 2006-11-05 15:33:26 +00:00
John Birrell
f4c93e2c4a Allow a makefile to set IGNORE_PRAGMA so that OpenSolaris code can
be built with other gcc warnings enabled.

Every Solaris source file has a #pragma ident in it. We can just
ignore those definitions.
2006-11-04 04:39:05 +00:00
John Birrell
87d0f81ce7 Add a build option to support WITH_CDDL and WITHOUT_CDDL, defaulting
to WITH_CDDL.

This option enables building code that is licensed under Sun's CDDL.
The DTrace code is licensed that way, so by default it will get built
unless the WITHOUT_CDDL option is used.

There is another build toggle, NO_CTF, which turns off execution of
ctfconvert and ctfmerge in sys.mk, but this can't be implemented as
WITH_/WITHOUT because bsd.own.mk isn't included in all Makefiles and
sys.mk is included automatically by make.
2006-11-01 09:02:11 +00:00