gcc47/libsupc++: Fix config.h for cp-demangle.c
Similar to the previous fix to gcc80/libstdcxx/libconv_supc, apply the
same config.h fix to gcc47/libsupc++.
gcc80/libstdcxx: Fix config.h for libconv_supc/cp-demangle.c
cp-demangle.c is provided by libiberty, so it must be built with
libiberty's 'config.h'. Introduce the 'GCC_NO_INC' make variable to
avoid including any search paths so we can specify the correct search
path for cp-demangle.c. Meanwhile, add the rule to copy over the
libiberty config.h.
In addition, apply GCC_NO_INC=yes to other libstdcxx components as it
turned out these search paths are unneeded.
pc64: Add '-mno-fp-ret-in-387' compiler option
This option prevents returning floating-point values in x87 registers.
I don't think our kernel has such issues, but just be safe.
gcc47,gcc80: Define LINK_SSP_SPEC to link with libssp_nonshared.a
libssp_nonshared.a provides '__stack_chk_fail_local()' as a hidden
symbol to avoids PLT overhead on 32-bit x86 by deferring PIC register
setup to the cold failure path. Although our libc.a (static) also
provides the '__stack_chk_fail_local()', it cannot be used when the
program is dynamically linked.
Note that on x86-64, GCC calls '__stack_chk_fail()' directly because
RIP-relative addressing makes PLT efficient, but we link
libssp_nonshared.a for consistency with other systems as well as for
future-proof.
One more thing, the 'TARGET_LIBC_PROVIDES_SSP' macro is undefined in GCC
4.7's 'auto-host.h' but defined to be 1 in GCC 8.0's. However, this
difference is ignored when 'LINK_SSP_SPEC' is explicitly defined.
gnu/lib/csu: Remove unused MFILE=${.ALLSRC} from 'tm.h' target
All the ${MFILE} variables used in gnu/usr.bin/cc* refer to man pages,
so this MFILE=${.ALLSRC} is never used.
gcc47: Minor cleanups to makefiles
- Remove unused LIBSUPCPP and GTFILES_SRCDIR.
- Include <bsd.subdir.mk> instead of <bsd.obj.mk> for cc_tools/Makefile
to make more sense.
cc80: Correct include paths for Makefile.langs and Makefile.cco
The reason that this mistake didn't cause any error is because the
first included Makefile.inc set a bunch of .PATH and make used one of
them to locate the "../Makefile.langs" and "../../Makefile.cco".
gcc80: Various cleanups and tweaks to makefiles
- Remove unused variables.
- Remove some commented directives.
- Remove unneeded '-I${.CURDIR}' from cc_tools/libcpp/Makefile.
- Fix multiple comments: typos, filenames, punctuations, etc.
- Change two unnecessary '+=' to be '='.
- Include <bsd.subdir.mk> for 'cc_tools/Makefile' to make more sense.
- Add a brief description for the origin of 'Makefile.zhack'.
xz(1): Remove the unneeded '${LZMADIR}/api/lzma' search path
This search path is unneeded, as the API headers there must be included
via the public header '${LZMADIR}/api/lzma.h'.
In addition, it would cause conflict with other headers in
liblzma/{check,common} etc. directories. This happened when I tried
to adjust the per-group flags to override the default flags (e.g.,
CFLAGS). An example error log is:
```
In file included from /usr/src/usr.bin/xz/../../contrib/xz/src/liblzma/common/block_buffer_encoder.c:17:
/usr/src/usr.bin/xz/../../contrib/xz/src/liblzma/api/lzma/check.h:16:3: error: #error Never include this file directly. Use <lzma.h> instead.
# error Never include this file directly. Use <lzma.h> instead.
^~~~~
```
tail(1): Almost sync with FreeBSD
The most important change is that the '-F' flag now supports files that
are not yet exist; it will persist in trying to open the files instead
of giving up. This behavior is the same as GNU tail.
Another major fix is that "tail -f" now works on non-local filesystems.
Things excluded from the sync:
- long options
- style changes
- capability/capsicum support
- expand_number(3) support (our libutil(3) doesn't have it)
In addition, improve the BOOTSTRAPPING handling a bit. The program
simply exits when -f/-F is specified.
tail(1): Fix '-r' (reverse) to work on pseudo filesystems
Pseudo filesystems (e.g., procfs) advertize a zero file size. Fix
reverse() to handle such a case so that '-r' works on pseudo
filesystems.
lagg.4: Improve the wired-wireless failover example
Adjust the failover example to change the MAC address of the *wired*
device instead of the *wireless* device, because some common wireless
devices do not support to change the MAC address.
Obtained-from: FreeBSD
nrelease - Preliminary Makefile adjustment to use dsynth (2)
* Add "binpkgs" option back in
* Add www/chromium to the gui build
* Use the -t option to du (calculate apparent size) so it does not
undercount the size of the root on a compressed H2 volume in order
to size a USB stick that is currently formatting UFS.
(we really need to adjust that whole mess to a dual-partition scheme
and use hammer2, but for now its still all in one UFS partition).
* Improve console output
dsynth - Don't auto-upgrade on basic directives, exit code on FAILUREs
* Don't auto-upgrade with the "build" and "force" directives. The
"install" and "upgrade-system" directives will will issue the
upgrade.
* Exit with code 1 if any builds fail with "FAILURE". Skipped packages
alone do not cause an exit code of 1.
nrelease - Preliminary Makefile adjustment to use dsynth
* Use dsynth to build packages. Note that we still have to bootstrap
"pkg" (chicken-and-egg issue).
* dsynth environment is placed in /usr/obj/release/build and is null-mounted
into the chroot.
* dsynth is run from the chroot to build and install packages.
* Output from buildworld/buildkernel/installworld/installkernel now written
to log files in /usr/obj/release instead of spewing to the console
to reduce clutter.