John Marino [Mon, 16 Feb 2015 19:08:17 +0000 (20:08 +0100)]
crunchide(1): fix offset for x86_64, restores WORLD_LDVER
The e_shoff offset for x86_64 is 40, not 44. FreeBSD figured this out
in January. The gold linker figured out there was a problem with the
crunch binaries when I tried WORLD_LDVER=ld.gold and it broke on initrd.
The ld.bfd linker didn't squawk. With the FreeBSD patch, buildworld
completes using the gold linker once again.
While here, tidy up a bit.
Sascha Wildner [Mon, 16 Feb 2015 19:12:56 +0000 (20:12 +0100)]
keyserv(8): Fix sizeof() of a pointer.
Commit
748a243b13dd295c04c9e06923a801157f6943e5 tried to fix this, but
did it wrongly, because xdrproc_t is a function pointer type and the
sizeof will still give 8.
The correct way is to use keybuf which is the type and has the correct
size (aka HEXKEYBYTES). It is done like this in key_set_1_svc_prog()
already.
Sascha Wildner [Mon, 16 Feb 2015 18:40:35 +0000 (19:40 +0100)]
keyserv(8): Raise WARNS to 2 and fix warnings.
Antonio Huete Jimenez [Mon, 16 Feb 2015 15:02:59 +0000 (16:02 +0100)]
Revert "hammer - Fix 'history' directive"
This reverts commit
417cb1b104fd140d4e31775d8873ad473216f7e4 which
broke the behaviour described in the manpage.
Spotted-by: tkusumi
John Marino [Mon, 16 Feb 2015 14:38:24 +0000 (15:38 +0100)]
unbreak world, take 2
The previous style works in the world makefiles but not here.
Try to fix the unbreak by checking if .MAKE.BUILT.BY is defined before
attempting to use it.
John Marino [Mon, 16 Feb 2015 14:32:03 +0000 (15:32 +0100)]
unbreak world
Upgrading from a world with the older bmake that didn't know
.MAKE.BUILT.BY results in a broken world, immediately. Change the check
from "&&" to two separate checks to avoid the malformed condition.
John Marino [Mon, 16 Feb 2015 13:18:38 +0000 (14:18 +0100)]
sys.mk: Add _GLIBCXX_USE_CXX11_ABI=0 definition in some cases
When the world is built by gcc47, and sys.mk isn't being used to build
the system, the CXXFLAGS will have -D_GLIBCXX_USE_CXX11_ABI=0 added to
it to force gcc50 to use the c++ ABI that gcc47 used when building the
system libraries.
If the world was built with gcc50, the system libraries were built
against the new c++ ABI so this flag would not be added in that case.
Due to new SYSBUILD definition in Makefile.inc1, this flag is never
added during the build of the world.
Sepherosa Ziehau [Mon, 16 Feb 2015 12:56:28 +0000 (20:56 +0800)]
memtemp/e5: Don't attach if CLTT is not set by BIOS in chn_temp_cfg
Tested-by: mneumann@
John Marino [Mon, 16 Feb 2015 10:57:04 +0000 (11:57 +0100)]
make(1): Create custom variable .MAKE.BUILT.BY
The value of .MAKE.BUILT.BY is normally either "gcc47" or "gcc50"
depending on which base compiler built the DragonFly world. It could
also be any valid CCVER for a dports compiler such as "clang35".
This capability is needed to handle the c++ ABI change that has been
introduced by gcc50. The problem hits when gcc50 is used to build when
the system libraries have been built by gcc47. The sys.mk file will
need .MAKE.BUILT.BY to adjust c++ flags appropriately.
Sepherosa Ziehau [Mon, 16 Feb 2015 07:13:22 +0000 (15:13 +0800)]
memtemp/e5: Setup hiwat and lowat before sensor task register.
Sepherosa Ziehau [Sat, 14 Feb 2015 14:47:02 +0000 (22:47 +0800)]
memtemp/e5: Send devctl notify, if DIMM is too hot, and set sensor status
- There is no need to save DIMM external id in dimm softc; use a stack
variable instead.
- White space cleanup.
Tomohiro Kusumi [Sun, 15 Feb 2015 11:44:39 +0000 (20:44 +0900)]
sys/vfs/hammer: minor zone cleanup
- hammer_generate_undo() takes either zone 1 or zone 2 address
(hammer generates undos for both volume metadata and buffers).
John Marino [Sun, 15 Feb 2015 10:48:54 +0000 (11:48 +0100)]
gcc50/libstdc++: Use generated symbol map instead
For both gcc47 and gcc50, we've been using pregenerate symbol map for
libstdc++ due to the apparently complexity of generating it. That's
already come back to bite on gcc50 as several symbols were modified and
added in the last couple of weeks. It was time to bite the bullet and
figure out how to generate the symbol map. It turns out that it really
wasn't that hard.
This *should* fix some dports errors (tbc).
Sascha Wildner [Sun, 15 Feb 2015 07:05:53 +0000 (08:05 +0100)]
Update the pciconf(8) database.
February 14, 2015 snapshot from http://pciids.sourceforge.net/
Tomohiro Kusumi [Sat, 14 Feb 2015 18:27:25 +0000 (03:27 +0900)]
sys/vfs/hammer2: fix typos
- Fix trivial typos in comments.
Tomohiro Kusumi [Tue, 3 Feb 2015 20:35:56 +0000 (05:35 +0900)]
sbin/hammer: cleanups
- Minor cleanups in addition to
24dd5805.
- hunk1 - no need to dereference indirect pointer **bufferp via direct
pointer *buffer in here anymore.
- hunk2 - all the rest of the code use **bufferp instead of **bufp.
- from Submit #2783
Tomohiro Kusumi [Tue, 3 Feb 2015 20:31:46 +0000 (05:31 +0900)]
sbin/hammer: add get_ondisk()
- Cleanup get_buffer_data() and get_node() using a new inline function
get_ondisk(). These two actually do the same thing except for the way
they release an existing buffer (--ref and eventually free it).
- from Submit #2783
Matthew Dillon [Sat, 14 Feb 2015 19:19:46 +0000 (11:19 -0800)]
systat - Improve pftop output
* Fix bugs where ICMP states were display bandwidth as '<huge>' .
* Fix bugs where the RB tree compare code would sometimes collapse
distinct states, creating confusion.
* Greatly improve readability by reformatting addresses and ports,
in particular truncating IPV6 addresses to fit better.
* Reduce jumping around of display elements as bandwidth values change.
Instead of sorting by the current bandwidth the display is sorted
by the 1/8 decay bandwidth.
François Tigeot [Sat, 14 Feb 2015 08:08:19 +0000 (09:08 +0100)]
drm: Add linux/ctype.h
François Tigeot [Sat, 14 Feb 2015 07:59:29 +0000 (08:59 +0100)]
drm: Add DMI_MATCH and DMI_EXACT_MATCH
Obtained-from: OpenBSD
François Tigeot [Sat, 14 Feb 2015 07:52:48 +0000 (08:52 +0100)]
drm: Update linux/kernel.h
* Add clamp_t and DIV_ROUND_UP_ULL(), both obtained from NetBSD
* Add WARN_ON_SMP()
* Add max3()
François Tigeot [Sat, 14 Feb 2015 07:41:44 +0000 (08:41 +0100)]
drm: Add get_seconds()
François Tigeot [Sat, 14 Feb 2015 07:33:25 +0000 (08:33 +0100)]
drm: Add linux/string.h
Obtained-from: FreeBSD's OFED subsystem
François Tigeot [Sat, 14 Feb 2015 07:25:40 +0000 (08:25 +0100)]
drm: Add linux/printk.h
François Tigeot [Sat, 14 Feb 2015 07:24:52 +0000 (08:24 +0100)]
drm: Add linux/spinlock.h
John Marino [Fri, 13 Feb 2015 22:09:44 +0000 (23:09 +0100)]
gcc50: use DF stddef.h by adding max_align_t
C11 and C++11 need the max_align_t type definition. In order to get it,
the gcc version was installed at /usr/libdata/gcc50/stddef.h. We'd
rather the base gcc use only system-provided headers, so the max_align_t
structure has been added to /usr/include/stddef.h
patch-from: swildner
François Tigeot [Fri, 13 Feb 2015 21:47:16 +0000 (22:47 +0100)]
drm: Update linux/workqueue.h
Obtained-from: FreeBSD's OFED subsystem
François Tigeot [Fri, 13 Feb 2015 21:40:59 +0000 (22:40 +0100)]
drm: Update various Linux headers
Joris Giovannangeli [Fri, 13 Feb 2015 19:37:33 +0000 (20:37 +0100)]
chflagsat: fix typo in prototype
Joris Giovannangeli [Fri, 13 Feb 2015 19:27:28 +0000 (20:27 +0100)]
add chflagsat system call
Michael Neumann [Fri, 13 Feb 2015 16:05:52 +0000 (17:05 +0100)]
nrelease - Revive the gui build
Pkgsrc is long gone. Update Makefile to use dports.
Michael Neumann [Fri, 13 Feb 2015 15:14:31 +0000 (16:14 +0100)]
Add option to override dports git host
By specifying GITHOST_DPORTS you can override the default git host for
fetching the dports.git repository:
cd /usr && make dports-create GITHOST_DPORTS=localhost
Michael Neumann [Fri, 13 Feb 2015 11:28:16 +0000 (12:28 +0100)]
ecc/memtemp/e5: Correct E5 v3 DID <-> SLOT
Revert the change in cb830af (revert PCI slot numbers) and instead
modify the PCI device ids. Channel 0/1 was swapped with channel 2/3.
John Marino [Fri, 13 Feb 2015 08:34:24 +0000 (09:34 +0100)]
gcc50: Switch to SVN over weekly snapshots for latest
A dports bulk run revealed at least 3 major issues, all of which have
already been fixed upstream. Two were found in 8 February snapshot, but
the third still hasn't been release. Since the snapshots are just
the packaged Subversion repo without the .svn directory, I'm switching
over to SVN directly until the prerelease.
With here, disable extra diagnostic checks which slow the compiler down
considerably.
John Marino [Fri, 13 Feb 2015 10:07:46 +0000 (11:07 +0100)]
Merge branch 'vendor/GCC50'
John Marino [Fri, 13 Feb 2015 08:18:26 +0000 (09:18 +0100)]
Update gcc-50 to SVN version 220677
Last Changed Date: 2015-02-13 08:56:14 +0100 (Fri, 13 Feb 2015)
Sepherosa Ziehau [Fri, 13 Feb 2015 09:16:47 +0000 (17:16 +0800)]
ecc/e5: Reorganize bootverbose prints a little bit
Sepherosa Ziehau [Fri, 13 Feb 2015 09:12:55 +0000 (17:12 +0800)]
ecc/memtemp: Add support for Intel E5 v3
Sepherosa Ziehau [Thu, 12 Feb 2015 13:25:08 +0000 (21:25 +0800)]
memtemp: Add support for Intel Core Haswell and E3 v3 cpus
Tested-by: dillon@ (no sensors available though)
François Tigeot [Thu, 12 Feb 2015 20:45:04 +0000 (21:45 +0100)]
installer: Don't create a separate /usr pfs
* /usr as a separate filesystem from / doesn't really make sense
anymore in this day and age. Both / and /usr binaries are dynamically
linked and belong to the same DragonFly base system.
* What's more, it's dangerous. With a separate /usr filesystem, the
rescue static binaries in /usr/share/initrd can't be accessed without
/usr mounted and in some situations /usr can't be mounted anymore with
the regular mount* binaries...
John Marino [Thu, 12 Feb 2015 17:50:18 +0000 (18:50 +0100)]
gcc50: Look for ld-elf.so.2 on the root slice always
A couple of us could not could not even get the shell after rebuilding
world with the new compiler. The problem was that several programs such
as sh, cd, mount*, etc need to run before /usr is mounted when /usr is on
a different slice (those programs are dynamically linked these days) I
didn't consider this when I decided to leave the interpreter at the default
value which is "/usr/libexec/ld-elf.so.2". That file is now symlink to
/libexec/ld-elf.so.2. sh, cd, etc, could not access the dynamic linker
because the mount command failed due to also needing the dynamic linker.
Let's rectify that bad decision now before any other systems get badly
messed up.
Tomohiro Kusumi [Thu, 12 Feb 2015 12:04:19 +0000 (21:04 +0900)]
test commit
Sascha Wildner [Thu, 12 Feb 2015 10:52:50 +0000 (11:52 +0100)]
make upgrade: Expand the list a bit for gcc44 removal.
Sepherosa Ziehau [Wed, 11 Feb 2015 09:06:17 +0000 (17:06 +0800)]
ecc/e3: Split it into two drivers, coremctl(4) and ecc(4)
coremctl(4), which maps the MCHBAR, is now the parent of ecc(4) for
Intel E3 cpus. This paves way to add Intel Core/E3 support to
memtemp(4).
Tested-by: dillon@ on i3/Haswell and E3/v3
Sepherosa Ziehau [Thu, 12 Feb 2015 08:48:33 +0000 (16:48 +0800)]
emx: Allow 2 TX rings for i217 and i218
Tested-by: dillon@ on i217
John Marino [Thu, 12 Feb 2015 08:12:44 +0000 (09:12 +0100)]
gcc50/stddef.h: Remove __FreeBSD only conditions
In a very special case of DragonFly masquerading as FreeBSD within dports,
using the stock stddef.h that comes with gcc always results in failure.
The masquerading is done by passing __FreeBSD definition through cflags,
and this causes the compiler to attempt to include headers that do not
exist on DragonFly. The gcc compilers in dports already have this fix.
This commit simply removes all clauses that pertain to FreeBSD and not
DragonFly.
John Marino [Wed, 11 Feb 2015 20:11:37 +0000 (21:11 +0100)]
Removal of unused gcc 4.4 sources and makefiles
It's been confirmed that a gcc50-built world and kernel boots and
functions as expected. With that good news, it is safe to remove
the gcc 4.4 sources and makefiles. It wasn't building and this will
make the cloning of a shallow repo faster.
John Marino [Wed, 11 Feb 2015 19:40:37 +0000 (20:40 +0100)]
gcc50/csu: Skip depends step to avoid possible race
I've witnessed buildworld break once on muscles at gcc50/csu, on the
depends step. I can reproduce the error manually by doing:
> cd gnu/lib/gcc50/csu
> wmake clean cleandepend
> wmake depend
It fails to locate insn-constants.h which should be avaiable due to
and include flag. The depends is just checking if all the headers are
in place. Skipping the depends step may prevent this breakage. I have
successfully built world with this patch so it doesn't do harm.
John Marino [Wed, 11 Feb 2015 17:56:45 +0000 (18:56 +0100)]
gcc50: Build with no-avx like gcc47
This check will also match newer gcc compilers from dports.
Requested-by: zrj (irc)
John Marino [Wed, 11 Feb 2015 13:25:43 +0000 (14:25 +0100)]
UPDATING: Initial entry discussing gcc 4.4 & 5.0
This entry may need updating before release, particularly if the release
version of GCC 5.0 is brought in and especially if gcc 5.0 becomes
designated as the primary compiler.
John Marino [Wed, 11 Feb 2015 13:07:55 +0000 (14:07 +0100)]
Bump __DragonFly_version to mark introduction of gcc50
Michael Neumann [Wed, 11 Feb 2015 11:04:36 +0000 (12:04 +0100)]
ecc/memtemp/e5 - Correct E5 v3 PCI slot numbers
The PCI slot numbers for E5 v3 IMC as introduced with commit
0c543cdd were
wrong, at least according to the hardware I am testing with (E5 1620).
After this commit and this patch from sephe [1] I can get ecc(4) and
memtemp(4) working on the E5 1600 v3 series:
ecc0: <Intel E5 v3 ECC node0 channel0> [tentative] at device 21.2 on pci255
ecc0: DDR4 ecc0: native DDR
ecc0: DIMM0 8GB, 1x4, density 4GB
ecc0: DIMM0 rank0, corrected error threshold 32767
ecc0: <Intel E5 v3 ECC node0 channel0> [attached!] at device 21.2 on pci255
memtemp0: <Intel E5 v3 memory thermal sensor node0 channel0> [tentative]
at device 21.0 on pci255
memtemp0: <Intel E5 v3 memory thermal sensor node0 channel0> [attached!]
at device 21.0 on pci255
[1]: http://leaf.dragonflybsd.org/~sephe/e5_v3_memtemp_ecc.diff
Sascha Wildner [Wed, 11 Feb 2015 09:50:05 +0000 (10:50 +0100)]
rwhod(8): Fix the warning and raise WARNS back up to 6.
'next' is only initialized and referenced (in separate if()'s) when
'quiet_mode' is not set. Unfortunately gcc does not realize this and
warns about 'next' being maybe uninitialized.
Fix this by initializing 'next', with no functional change.
Sascha Wildner [Wed, 11 Feb 2015 09:59:28 +0000 (10:59 +0100)]
pppd(8): Include libpcap's config.h for HAVE_* in pcap-int.h.
Sascha Wildner [Wed, 11 Feb 2015 09:57:36 +0000 (10:57 +0100)]
pflogd(8): Fix the warning and raise WARNS back up to 5.
The issue here is that pcap-int.h (from libpcap) is included without
also including libpcap's config.h. This results in HAVE_STRLCPY not
being set which makes visible the strlcpy() compatibility macro in
pcap-int.h where gcc ultimately warns.
Fix by including libpcap's config.h so the pcap-int.h header knows
that we have strlcpy().
While here, fix a wrong comparison of if_exists()'s result with -1
as if_exists() only returns 0 or 1 (as correctly pointed out by grim7
in the IRC channel).
Sepherosa Ziehau [Wed, 11 Feb 2015 08:53:40 +0000 (16:53 +0800)]
ix: Fix and simplify link state bit testing logic
Noticed-by: joris@
John Marino [Wed, 11 Feb 2015 08:03:31 +0000 (09:03 +0100)]
games: Fix real bugs on three games (found by gcc 5.0)
I had NO_GAMES set so I missed these bugs yesterday. Adventure, Fortune,
and Mille all had bugs in them (the latter had two).
Now gcc-5.0 can build the entire world and kernel.
I still need to verify that a gcc-5.0 built world and kernel is bootable
and works though.
Sepherosa Ziehau [Sun, 8 Feb 2015 13:49:48 +0000 (21:49 +0800)]
ecc/memtemp/e5: Prepare for E5 v3 support
John Marino [Wed, 11 Feb 2015 01:59:18 +0000 (02:59 +0100)]
kern ath drivers: Fix loops bounds (real bug x2) + source
The ar9300 source had a couple of logic ambiguities causing
[-Werror=logical-not-parenthesis] warnings. The other two used the
wrong variable for the upper bounds of the loop. I assume it was
correct once but the code changed, and the author neglected to use the
next edges max value.
John Marino [Wed, 11 Feb 2015 01:57:59 +0000 (02:57 +0100)]
kern: Fix [-Werror=aggressive-loop-optimizations]
These were basic upper bound checking errors on loops
John Marino [Wed, 11 Feb 2015 01:51:05 +0000 (02:51 +0100)]
kernel: Fix -Wmaybe-unitialized
Likely there was never a bug here, so explicitly initializing won't
make a difference other than make gcc 5.0 happy.
John Marino [Wed, 11 Feb 2015 01:48:43 +0000 (02:48 +0100)]
kern: Fix [-Werror=logical-not-parenthesis]
Since the whole point of this error is that logic order can be
ambiguous, I'm not 100% sure confident in these fixes, but they are
required to get the kernel to build with gcc 5.0.
John Marino [Tue, 10 Feb 2015 22:42:37 +0000 (23:42 +0100)]
gcc50: local mod to support kernel printf formats
The diff from gcc47 patched without issues (only line offsets).
John Marino [Tue, 10 Feb 2015 23:28:25 +0000 (00:28 +0100)]
kern: Make sure gcc47 - gcc50 don't check for set-not-used
John Marino [Tue, 10 Feb 2015 23:04:33 +0000 (00:04 +0100)]
kern: Address set-but-unused warnings (mostly)
On of these is an [-Werror=logical-not-parenthesis] error.
This is as far as I can get without implementing %r format again.
John Marino [Tue, 10 Feb 2015 22:26:16 +0000 (23:26 +0100)]
rwhod(8): Lower WARNS to 2 (masks -Wmaybe-uninitialized)
John Marino [Tue, 10 Feb 2015 22:17:53 +0000 (23:17 +0100)]
pflogd(8): lower WARNS and fix logic errors
The contrib files trigger a new -Wunused-value warning, so lower WARNS
to 3 to suppress that. Also, a [logical-not-parenthesis] error was
triggering [-Werror=bool-compare]. Fixing it fixed the compare too.
John Marino [Tue, 10 Feb 2015 22:16:21 +0000 (23:16 +0100)]
bsd.sys.mk: Teach it about -Wunused-value (new with gcc4.9)
John Marino [Tue, 10 Feb 2015 22:01:25 +0000 (23:01 +0100)]
keyserv(8): Fix size argument on debugging output
This was another size of pointer problem.
John Marino [Tue, 10 Feb 2015 21:49:25 +0000 (22:49 +0100)]
truss(1): remove inline directive to fix [-Werror=inline]
GCC 5.0 thinks inlining the usage function will fail and only cause the
program to get bigger. Minor, but I'll following GCC's advice.
John Marino [Tue, 10 Feb 2015 21:38:44 +0000 (22:38 +0100)]
opiekey (contrib): Fix serious (?) [-Wsizeof-pointer-memaccess]
On a password verification function of opiekey, the amount of bytes
allocated to a secret was 4 bytes of i386 and 8 bytes of x86-64. Memset
was using the size of the pointer to allocate memory.
Change 3 instances of this to size OPIE_SECRET_MAX + 1 to fix it.
FYI this vendor branch is like 16 years old...
John Marino [Tue, 10 Feb 2015 21:18:18 +0000 (22:18 +0100)]
sysctl(8): fix [-Werror=logical-not-parentheses] error
John Marino [Tue, 10 Feb 2015 21:15:00 +0000 (22:15 +0100)]
rtsol(8): Fix loop bug (aggressive-loop-optimizations)
The index was being checked for validity after the array was accessed,
putting the check first makes gcc 5.0 happy.
John Marino [Tue, 10 Feb 2015 20:57:32 +0000 (21:57 +0100)]
newfs_hammer(8): fix [-Wsizeof-pointer-memaccess]
The device type comparison only worked by accident on x86-64 and not
reliability on i386 because the sizeof function returned the size of
the address rather than the size of the vol->type string. Fix by
specifying the size of "DEVICE" to strncmp instead.
John Marino [Tue, 10 Feb 2015 20:55:23 +0000 (21:55 +0100)]
natacontrol(8): Fix [-Werror=logical-not-parentheses] error
John Marino [Tue, 10 Feb 2015 20:18:09 +0000 (21:18 +0100)]
devd(8): Lower WARNS from 5 to 2 (has unused local typedefs)
GCC 5.0 has detected local unused typedefs, so lower the warnings so
that compiler can build it.
John Marino [Tue, 10 Feb 2015 20:22:58 +0000 (21:22 +0100)]
bsd.sys.mk: support -Wunused-local-typedef
Add support to bsd.sys.mk for a new warning, unused-local-typedef. This
warning showed up in gcc 4.8 and is included in -Wall. Hopefully I did
this correctly, but if not, swildner will soon correct it. :)
John Marino [Tue, 10 Feb 2015 19:28:22 +0000 (20:28 +0100)]
Fix static archive libstdc++.a for gcc 5.0
The libstdc++ libaries for gcc 5.0 are built differently than they have
been in the past, and closely mirror what the vendor build system does.
Three "convenience" librarys are built first: c++98, c++11, and supc++.
Both static and PIC versions are built. The final library combines the
three components along with about 10 unique objects.
It worked fine for the shared version (libstd.so.9) but the static
version was unreadable. I fixed it by creating a dedicated "ar" script
to dictate what gets assembled in the new static archive. It would
have been a sweet solution has "ar" not had an incredible limitation:
The script can not have consecutive "+" characters on any line. To
work around this, I had to:
1) rename the 3 component libraries (all had ++ in the name)
2) rename the output library (libstdc++.a => libstdcxx.a)
3) copy all the cc files with "++" in their names to a new filename.
This affected about 3-4 files.
4) move the output library back to the proper name of libstdc++.a
What a pain those hacks were, but it works and gcc-5.0 can now build
itself. It still can't complete world due to Werror trigging on new
warnings, but it's a good fix.
John Marino [Tue, 10 Feb 2015 19:24:32 +0000 (20:24 +0100)]
bsd.lib.mk: Allow for possibility to override static lib target
The upcoming fix for gcc 5.0 libstdc++.a requires a dedicated static
library target. Up until now this hasn't been possible without bmake
screaming about duplicate targets (although it does work). Add a simple
"if not target defined" check to bsd.lib.mk to avoid these warnings.
John Marino [Tue, 10 Feb 2015 19:22:31 +0000 (20:22 +0100)]
Add two more files to contrib/gcc-5.0/README.DELETED
These were removed from the vendor branch to avoid the makefiles
accidentally picking up the generic version instead of the dfly version.
They were libstdc++ source files.
John Marino [Tue, 10 Feb 2015 19:21:01 +0000 (20:21 +0100)]
Merge branch 'vendor/GCC50'
John Marino [Tue, 10 Feb 2015 19:16:45 +0000 (20:16 +0100)]
Remove two generic configure files for libstdc++
They are superceded by DragonFly-specific files
Imre Vadasz [Tue, 10 Feb 2015 15:42:41 +0000 (16:42 +0100)]
John Marino [Tue, 10 Feb 2015 14:13:34 +0000 (15:13 +0100)]
Hook gcc 5.0 (pre-release) in build, unhook gcc 4.4
Effectively replace GCC 4.4 with the 1 February 2015 snapshot of the
pre-release GCC 5.0. This compiler is in pretty good shape, but it is
not perfect. It cannot fully build world if WORLD_CCCVER is set to
GCC50. This compiler import is a work in progress.
* The old compiler has been unhooked.
* The gcc44 sources may be removed soon
* Obviously NO_GCC44 doesn't work anymore
* NO_GCC50 has been created and should work
* NO_CXX was never documented and has been removed
* NO_OBJC was not deemed worthwhile and it has been removed
* man pages have been updated accordingly
* default make.conf has been updated accordingly
* Per bsd.sys.mk, gcc50 behaves just like gcc47
* Actually, all CCVER starting with "gcc" now behave like gcc47
* The proper CCVER value is "gcc50". If "gcc5" is specified, the
dports compiler lang/gcc5 will be used.
Iterating: THIS IS AN EXPERIMENTAL COMPILER! It's not ready for
prime-time yet. Do NOT set WORLD_CCVER to "gcc50".
John Marino [Tue, 10 Feb 2015 13:46:24 +0000 (14:46 +0100)]
Add README's to new vendor/GCC50 branch and one local mod
Since GCC 5.0 will be the first release to officially support DragonFly,
there are very few local modifications planned, three. At this time,
I'm only adding the first which defines the default search directories
for gcc libraries and programs.
John Marino [Tue, 10 Feb 2015 13:44:04 +0000 (14:44 +0100)]
Merge branch 'vendor/GCC50' - gcc 5.0 snapshot 1 FEB 2015
John Marino [Tue, 10 Feb 2015 13:36:59 +0000 (14:36 +0100)]
Import pre-release gcc-5.0 to new vendor branch
John Marino [Tue, 10 Feb 2015 13:06:06 +0000 (14:06 +0100)]
gcc50: Bring in makefiles but leave them unhooked
The pre-release version of GCC 5.0 will be brought into base soon. This
commit brings in the makefiles that build it, but they are not hooked
into the build in any way. Before that happens, the vendor branch needs
to be merged into base, and dozens for files need to be simultaneously
changed. GCC 4.4 will be unhooked at the same time.
The GCC releases provide pre-generated man pages, but the pre-releases do
not. To support this, a switch has been added that installs man pages
from these directories. When GCC 5.0 is released, those man pages will
be removed and the man pages will be installed from contrib/gcc-5.0
John Marino [Tue, 10 Feb 2015 11:51:37 +0000 (12:51 +0100)]
libevtr: Fix loop properly
The bruteforce fix should have used elements 0 - 2 because the strings
array was defined as EVTR_NS_MAX - 1, not EVTR_NS_MAX. So the fix was
wrong, but it exposed the problem with the original code: the upper bound
of the loop was set to EVTR_NS_MAX, not EVTR_NS_MAX - 1 like the "maps"
version below it.
This commit reverts the previous change and fixes the problem with the
original code.
spotted-by: ivadasz
John Marino [Tue, 10 Feb 2015 10:29:03 +0000 (11:29 +0100)]
sh (1): Remove -Werror conditionally due to seven clobber candidates
GCC 5.0 is screaming about sh potentially getting clobbered by longjmp.
I don't know how to fix this and the WARNS system doesn't cover
-Wclobbered so I'm turning -Werror off forcibly until somebody else can
fix it. The error messages are:
/usr/src/bin/sh/eval.c: In function 'exphere':
/usr/src/bin/sh/eval.c:496:6: warning: variable 'need_longjmp' might be
clobbered by 'longjmp' or 'vfork' [-Wclobbered]
/usr/src/bin/sh/eval.c: In function 'evalcommand':
/usr/src/bin/sh/eval.c:794:6: warning: variable 'mode' might be clobbered
by 'lngjmp' or 'vfork' [-Wclobbered]
/usr/src/bin/sh/eval.c:799:17: warning: variable 'savehandler' might be
clobberd by 'longjmp' or 'vfork' [-Wclobbered]
/usr/src/bin/sh/histedit.c: In function 'histcmd':
/usr/src/bin/sh/histedit.c:192:8: error: variable 'pat' might be
clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
/usr/src/bin/sh/histedit.c:198:8: error: variable 'efp' might be
clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
/usr/src/bin/sh/parser.c: In function 'parsebackq':
/usr/src/bin/sh/parser.c:982:6: warning: variable 'saveprompt' might be
clobbered by 'longjmp' or 'vfork' [-Wclobbered]
/usr/src/bin/sh/parser.c:973:18: warning: argument 'out' might be
clobbered by longjmp' or 'vfork' [-Wclobbered]
John Marino [Tue, 10 Feb 2015 09:51:33 +0000 (10:51 +0100)]
ed(1): Fix [-Werror=logical-not-parentheses]
/usr/src/bin/ed/glbl.c:64:36: error: logical not is only applied to the
left hand side of comparison [-Werror=logical-not-parentheses]
Putting parenthese around the comparison makes gcc happy.
Sepherosa Ziehau [Tue, 10 Feb 2015 09:47:21 +0000 (17:47 +0800)]
wlan: Let driver holds WLAN serializer for ieee80211_ifattach
Looks like almost all building drivers (except, ndis(4) and wpi(4))
hold WLAN serializer for ieee80211_ifattach(), so we release the
WLAN serializer in ieee80211_ifattach() before the if_attach().
This reverts
4109d03b12096f353e4036119a0d6357fa1ec67e and
part of
a583ece6b440118aa26f3eb162a1df7f2821f923.
Reported-by: marino@
John Marino [Tue, 10 Feb 2015 09:32:02 +0000 (10:32 +0100)]
libstand: Fix loop with undefined optimized behavior
With gcc 4.8+, libstand fails to build with "interation 8u involved in
undefined behavior [-Werror=aggressive-loop-optimizations]". I figured
out that problem was the code was intentionally defining two fields in
the same structure with a single loop.
The "name" field is an array of size 8 while the "ext" field is an array
of size 3. The loop in question iterated 11 times to initialize both,
relying on contiguous memory to work. Apparently this leads to undefined
behavior, so I altered the line to explicitly define the correct element
on the correct field.
John Marino [Tue, 10 Feb 2015 09:00:05 +0000 (10:00 +0100)]
libevtr: Remove loop with undefined optimized behavior
Starting with gcc 4.8 I believe, one particular loop in evtr.c fails to
compile. The error is "interation 3u involved undefined behavior
[-Werror=aggressive-loop-optimizations]".
No alternative I tried worked, so I finally just removed the loop since
it only iterates 4 times. It's brute force but the code is correct.
John Marino [Tue, 10 Feb 2015 01:41:18 +0000 (02:41 +0100)]
ncurses: Apply patch from upstream to allow building by gcc 5.0
The gcc 5.0 processor will mangle the headers produced by this script.
It has already been fixed in official patches from upstream. Applying
the appropriate patch will allow gcc 5.0 to build ncurses, and gcc 4.7
has been verified to continue to work as well.
John Marino [Mon, 9 Feb 2015 23:36:18 +0000 (00:36 +0100)]
libc: Silence a bunch of set-but-not-used errors found by gcc 5.0
During testing of upcoming base gcc 5.0, several libc files failed to
compile with -Werror set. This commit will silence the errors. For the
majority of these, I designed the variables as "__unused" so the compiler
knows that their (lack of) use is intentional. For the rest, I just
removed the variables completely.
Michael Neumann [Sat, 7 Feb 2015 21:11:21 +0000 (22:11 +0100)]
e1000 (em, emx, ig_hal): Sync w/ intel em-7.4.2
This adds support for network chips based on PCH_I218_{LM2,V2,LM3,V3}.
Tested with:
* 82571, 82573, 82574 (sephe)
* emx: I217_V (dillon)
* em/emx: 82574L, I218_V2 (mneumann)
Sascha Wildner [Sun, 8 Feb 2015 22:33:39 +0000 (23:33 +0100)]
kernel/sound: Add missing unlock (we panic on lockuninit() on a held lock).
Sepherosa Ziehau [Sun, 8 Feb 2015 12:30:25 +0000 (20:30 +0800)]
memtemp.4: Add manpage for memtemp
Sepherosa Ziehau [Thu, 22 Jan 2015 13:28:43 +0000 (21:28 +0800)]
ifnet: Make ifnet and ifindex2ifnet MPSAFE
- Accessing to these two global variables from non-netisr threads uses
ifnet lock. This kind of accessing is from
- Accessing to ifindex2ifnet from netisrs are lockless MPSAFE.
- Netisrs no longer access ifnet, instead they access ifnet array as of
this commit, which is lockless MPSAFE.
Rules for accessing ifnet and ifindex2ifnet is commented near the
declaration of the related global variables/functions in net/if_var.h.