Fix 'broken' ifdefs.
icc does not support profiling yet so remove unfinished code which was
supposed to help.
Submitted by: netchild (original version)
Reviewed by: ru
Intel C/C++ compiler (lang/icc) to build the kernel.
The icc CPUTYPE CFLAGS use icc v7 syntax, icc v8 moans about them, but
doesn't abort. They also produce CPU specific code (new instructions
of the CPU, not only CPU specific scheduling), so if you get coredumps
with signal 4 (SIGILL, illegal instruction) you've used the wrong
CPUTYPE.
Incarnations of this patch survive gcc compiles and my make universe.
I use it on my desktop.
To use it update share/mk, add
/usr/local/intel/compiler70/ia32/bin (icc v7, works)
or
/usr/local/intel_cc_80/bin (icc v8, doesn't work)
to your PATH, make sure you have a new kernel compile directory
(e.g. MYKERNEL_icc) and run
CFLAGS="-O2 -ip" CC=icc make depend
CFLAGS="-O2 -ip" CC=icc make
in it.
Don't compile with -ipo, the build infrastructure uses ld directly to
link the kernel and the modules, but -ipo needs the link step to be
performed with Intel's linker.
Problems with icc v8:
- panic: npx0 cannot be emulated on an SMP system
- UP: first start of /bin/sh results in a FP exception
Parts of this commit contains suggestions or submissions from
Marius Strobl <marius@alchemy.franken.de>.
Reviewed by: silence on -arch
Submitted by: netchild
- Don't put libc.a as a dependency if program is linked with -nostdlib.
- Added INTERNALPROG (by analogy to INTERNALLIB) for programs which are
built only for its side effect and shold not be installed.
- do not use PROG for what's not a real C program,
- use sys.mk transformation rules where possible,
- only create the "machine" symlink on AMD64,
- removed MAINTAINER lines in individual makefiles,
- added the LIBSTAND defitinion to <bsd.libnames.mk>,
- somewhat better contents in .depend files.
Tested on: i386, amd64
Prodded by: bde
CFLAGS in all cases, but POSIX requires a default of -O. Adding
-pipe unconditionally still is still broken for non-gcc compilers
in the non-POSIX case.
- Added missing NOCRYPT and NO_OPENSSL checks for Kerberos.
- Don't depend on -lcrypto and -lcrypt in pam_ssh to resolve
dependencies in pam_krb5 and pam_ksu -- the former may not
be compiled at all if NO_OPENSSH knob is enabled.
- Added missing -lcrypt to pam_ssh dependencies.
- Moved librpcsvc after libypclnt.
(The last two aren't strictly speaking necessary to resolve
the dependencies of static versions of pam_ssh and pam_unix,
respectively, but they correspond to dynamic dependencies
of libssh and libypclnt, and are put here for consistency.)
In collaboration with: bde
Reviewed by: des
missing and there are multiple choices using multiple inference
(suffix transformation) rules.
This is known to fix compilation of s_log1p.o in lib/msun on i386,
as otherwise it attempted to use s_log1p.S as the source (which is
marked broken) instead of legal s_log1p.c which is in CFLAGS. The
normal case where .depend file exists is not affected.
Reviewed by: bde
needed for generating dependencies. SRCS are always part of it,
and normally only they.
This can be useful in some random cases where it's necessary to
have something in .depend that isn't part of SRCS. This will be
used to replace a hack in lib/libpam/libpam/Makefile.
form became unnecessary with the bsd.prog.mk,v 1.69 change.
- Eliminated duplicate y.tab.h in SRCS.
Reviewed by: bde
- Complementary to the said bsd.prog.mk change, use the fact
that inner .for loops are not real loops but a tricky form
of a local macro for the outer loop's variable, and switch
to using faster variable modifiers to replace extensions.
libraries to be reported as up-to-date.
Before:
# make -f /dev/null nonexistent.a
`nonexistent.a' is up to date.
After:
# make -f /dev/null nonexistent.a
make: don't know how to make nonexistent.a. Stop
PR: bin/44137 (part of)
as it was decided that our toolchain will revert to looking
for libraries in /usr/lib only.
- Make /usr/lib/libfoo.so -> /lib/libfoo.so.X symlinks absolute
so that they still work if /usr is symlinked.
- Remove stale /usr/lib/libfoo.so.X libraries during install.
Discussed with: gordon, obrien, peter
hose your system. You end up with just about everything statically linked
(except for libpam.so), which then causes all the pam users to fail.
eg: login, sshd, su etc all stop working because dlopen no longer works
because there is no libc.so in memory anymore.
gcc passes -L/usr/lib to ld. The /usr/lib/libxxx.so symlink is *not* a
compatability link. It is actually the primary link. There should be no
symlinks in /lib at all. Only /lib/libXX.so.Y.
peter@daintree[9:27pm]/usr/bin-104> file yppasswd
yppasswd: setuid ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), for FreeBSD 5.1.1, dynamically linked (uses shared libs), stripped
peter@daintree[9:27pm]/usr/bin-105> ldd yppasswd
yppasswd:
libpam.so.2 => /usr/lib/libpam.so.2 (0x280d1000)
peter@daintree[9:28pm]/usr/bin-106>
Note no libc.so.5. Hence libpam.so.2 has unresolved dependencies.
I believe this is also the cause of the recent buildworld failures when
pam_krb5.so references -lcrypto stuff etc and when librpcsvc.so references
des_setparity() etc.
This change could not possibly have worked, unless there are other missing
changes to the gcc configuration. It won't work with ports versions of
gcc either.
are created in the correct location. Always make them. For libraries
that live in /lib, this causes a /lib/libfoo.so and a compatibility
/usr/lib/libfoo.so to be created. We may want to drop the
/usr/lib/libfoo.so symlink at some future point.
need relative pathing to work correctly. This is s necessary step
for putting libraries in /lib while the .so symlinks still live
in /usr/lib.
This should be a big NOOP in the case where SHLIBDIR == LIBDIR.
This is simpler, and is easy to do now that make(1) supports substituting
regexps. Fixed missing '$' anchor in the regexp. Use less cryptic names
for temporary variables.
Submitted by: ru (early version)
Reviewed by: ru