Commit Graph

90 Commits

Author SHA1 Message Date
kamil
e5038c36e9 Cherry-pick upstream patch for internal_mmap() in GCC(.old) sanitizers
Fix internal_mmap() on 32-bit NetBSD platforms

There is need to use internal_syscall64() instead of internal_syscall_ptr().
The offset argument of type off_t is always 64-bit.

http://llvm.org/viewvc/llvm-project?view=revision&revision=333075

PR kern/53261 by Martin Husemann
2018-05-23 11:16:13 +00:00
mrg
875f3f406e apply the changes from GCC 6 / powerpc and netbsd-stdint.h
to make <stdatomic.h> work.
2018-04-14 08:09:46 +00:00
mrg
7032fd789a add the spectre mitigation options for x86:
-mindirect-branch=<choice>
  -mfunction-return=<choice>
  -mindirect-branch-register

the values for 'choice' are "keep" (default, existing behaviour),
"thunk", "thunk-inline", and "thunk-extern".

as taken from the Ubuntu port of these changes in their
ubuntu:gcc-5_5.5.0-8ubuntu1.diff.  i've also included the doc
updates that are missing from ubuntu from gcc itself.


i've tested both i386 and amd64 fairly heavily with these options
enabled in both kernels and userland, atf runs and hundreds of
package builds.

XXX: pullup-8 to gcc/ not gcc.old/
2018-03-28 19:24:52 +00:00
mrg
7b319e81c3 fix the cleanfiles for hooks mechanism 2018-03-13 03:17:01 +00:00
mrg
a23ad621f4 remove this obsolete file that has a lot of dated info from
about the time we started switching some ports to GCC 5.3.
2018-02-23 01:01:22 +00:00
christos
a3a22b2ed2 we now has _UC_MACHINE_FP. 2018-02-15 19:02:06 +00:00
maya
0cca4bc316 Use bools with bool. NFCI.
From Henning Petersen in PR toolchain/53009.
(I completed for the rest of the function. Similar code exists in GCC trunk.)
2018-02-11 13:50:15 +00:00
kamil
413e439cd5 Install GCC (gcc.old/) headers for Sanitizers
Install:
 - allocator_interface.h
 - asan_interface.h
 - common_interface_defs.h
 - tsan_interface_atomic.h

Into:
 - /usr/include/gcc-5/sanitizer

Note headers in a comment headers for introduction in future:
 - dfsan_interface.h
 - lsan_interface.h
 - msan_interface.h

Skip a file that will never be relevant on NetBSD:
 - linux_syscall_hooks.h

PR 52265 by Kamil Rytarowski

Proposed and accepted on tech-toolchain@.

Sponsored by <The NetBSD Foundation>
2018-02-01 20:50:22 +00:00
joerg
92677a93f8 Don't override X87_ENABLE_ARITH. Since we default to long double
rounding, the default value is correct for us.
2017-12-02 23:05:52 +00:00
skrll
3f391d52fc Match hppa JEMALLOC_TINY_MIN_2POW 2017-11-16 13:54:42 +00:00
mrg
0ace67202c ensure version.c gets rebuilt properly. 2017-11-15 07:47:10 +00:00
mrg
9f4f6abc0f attempt to fix liblto_plugin build. on sparc it at least now
appears to have no missing symbols.  add xasprintf.c, xvasprintf.c,
and vprintf-support.c.

fix vprintf-support.c to include vprintf-support.h.
2017-11-14 08:52:20 +00:00
mrg
cd95df3a39 regen for GCC 5.5. 2017-11-14 00:54:48 +00:00
mrg
64328a215c it's ${BUILDINCS} not {BUILDINCS} 2017-11-14 00:54:38 +00:00
mrg
05bf8f96a1 mknative-gcc for some GCC 5.5. c++config.h is wrong so far. 2017-11-13 19:24:32 +00:00
martin
c4d8205949 Fix what looks like a merge botch. 2017-11-13 11:49:16 +00:00
mrg
ea67e31f69 merge GCC 5.5.0 in gcc.old. 2017-11-13 08:05:16 +00:00
mrg
f6d92a9fbc import GCC 5.5 into gcc.old. 2017-11-13 07:46:18 +00:00
kamil
e96e0a6e7b Build liblto_plugin.so with safe-ctype.c
This corrects linking attempt with GNU binutils GOLD (linker).

ld.gold: error: /usr/libexec/liblto_plugin.so: \
could not load plugin library: /usr/libexec/liblto_plugin.so: \
Undefined symbol "_sch_istable" (symnum = 12)

Keep the same minor for the previous recent bump.
2017-11-11 07:49:43 +00:00
christos
8d1bd5c1e5 undo previous; we can't link with libiberty because it is a private library
and not build as pic. Instead just bring in the xstrerror.c source from it.
2017-11-05 01:16:16 +00:00
kamil
97baba3441 Bump lib minor for liblto_plugin.so link with -liberty
PR 52674 by myself
2017-11-04 16:21:49 +00:00
kamil
e81e3afa16 Link liblto_plugin with -liberty (gcc.old)
GCC passes liblto_plugin.so in the linker invocation (part of "gcc -v file.c"):

ld -plugin /usr/libexec/liblto_plugin.so -plugin-opt=/usr/libexec/lto-wrapper \
-plugin-opt=-fresolution=/var/tmp//ccxda9Ar.res \
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc \
-plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s \
-plugin-opt=-pass-through=-lgcc --eh-frame-hdr -dc -dp -e _start \
-dynamic-linker /usr/libexec/ld.elf_so /usr/lib/crt0.o /usr/lib/crti.o \
/usr/lib/crtbegin.o /var/tmp//cc7A7mOK.o --as-needed -lgcc_s --no-as-needed \
-lgcc -lc --as-needed -lgcc_s --no-as-needed -lgcc /usr/lib/crtend.o \
/usr/lib/crtn.o

When attempting to use GNU GOLD, liblto_plugin.so cannot be used because it \
has missing symbol xstrerror:

ld: error: /usr/libexec/liblto_plugin.so: could not load plugin library: \
/usr/libexec/liblto_plugin.so: Undefined PLT symbol "xstrerror" (symnum = 38)

From Makefiles and sources inspection, liblto_plugin.so shall be linked with \
libiberty (-liberty), a utility GNU library for internal usage with helping \
functions.

PR 52674 by myself
2017-11-04 15:59:16 +00:00
joerg
322628b0a0 Don't try to rebuild gengtype-lex.c from yacc. 2017-10-08 11:08:55 +00:00
kre
5067e4eb0f Actually bump lib versions, to match bump in sets files. 2017-10-07 00:06:11 +00:00
christos
510540c911 re-run mknative to disable the libstdc++ "dual abi". Bump. 2017-10-05 23:46:34 +00:00
wiz
877c1e6101 Fix typo in comment. 2017-10-05 06:30:19 +00:00
christos
507caaad52 Add stdatomic.h 2017-10-04 23:43:23 +00:00
mrg
26c43e3543 move the GMP_MACHINE_ARCH definition into external/lgpl3/gmp/Makefile.arch.
soon to be GMP 6 allows us to have only two arm copies.
2017-08-22 09:17:50 +00:00
mrg
bbf2be38c0 put the location of gmp/mpc/mpfr in a variable so we can .old them. 2017-08-04 01:18:39 +00:00
mrg
56cd2f0399 pass the target specific CPUFLAGS and CPPFLAGS for the .c.o rule.
should fix a problem rjs@ reported.
2017-08-03 22:01:29 +00:00
mrg
79ce5b417f remove unused files 2017-08-03 22:00:38 +00:00
maya
8340d18be5 Apply upstream patch:
Incorrect codegen from rdseed intrinsic use (CVE-2017-11671)

We should not expand call arguments in between flags reg setting and
flags reg using instructions, as it may expand with flags reg
clobbering insn (ADD in this case).

Attached patch moves expansion out of the link. Also, change
zero-extension to non-flags reg clobbering sequence in case we perform
zero-extension with and.

2017-03-25  Uros Bizjak
2017-07-28 22:24:27 +00:00
he
f52ac36319 For alpha, generating alpha.d first needs pass-instances.def re-generated. 2017-07-27 16:05:15 +00:00
mrg
7a0caf96a5 merge GCC 5.4 into gcc.old. 2017-07-23 01:10:50 +00:00
mrg
7d9adb1cf1 import the GCC 5.4 srcs from -current as gcc.old in preparation for GCC 6. 2017-07-23 01:04:23 +00:00
skrll
b51620c841 Remove gcc.old now it is no longer used. 2016-10-09 09:26:45 +00:00
scole
6afc3b56dd PR port-ia64/51261
Change JEMALLOC_TINY_MIN_2POW for ia64
2016-08-05 16:25:18 +00:00
mrg
6c93c005b3 find gcov.1 again. 2016-07-07 03:15:58 +00:00
mrg
703c8b8111 missed from previous:
remove old generated versions of man pages.
update the dist versions of man and info pages to include local changes.
2016-07-06 11:37:26 +00:00
mrg
e292c2206e remove old generated versions of man pages.
update the dist versions of man and info pages to include local changes.
2016-07-06 11:21:17 +00:00
skrll
11d5fda1b2 Preserve the arm architecture version (if present) 2016-05-12 15:27:54 +00:00
skrll
c384c5b3fa For earm use the compiler to determine sf vs hf 2016-05-12 12:51:53 +00:00
skrll
74f1f7b042 Doh... don't add the ABI to 'os'. Hopefully arm is really fixed now. 2016-05-12 10:55:03 +00:00
skrll
8a8024b50c Sync config.guess with upstream, but maintain earm* stuff.
Fixes tools build on arm platform.
2016-05-12 08:43:49 +00:00
christos
75518e7407 Propagate PLT fix from our gcc-5.3 tree:
Some functions like __udivsi3 are used in other assembly files like __umodsi3.
Use PLT linkage to avoid text relocations.

XXX: pullup-7
2016-04-22 18:05:52 +00:00
mrg
0010df8996 regenerate mknative-gcc for GCC 4.8 and *arm* 2016-04-21 07:24:09 +00:00
skrll
a7d674ca52 Re-order includes so that ARM_TARGET2_DWARF_FORMAT takes effect
Fixes PR/51066: C++ text relocations
2016-04-20 06:51:03 +00:00
martin
f9c9a2217e "Extended version" of the "mips64 hack" used in gcc 5.3's libgcc.a
build: avoid lots of duplicate symbols on softfloat builds.
Now mac68k is buildable with MKSOFTFLOAT=yes again, finally!
2016-03-31 15:06:39 +00:00
christos
09efa38c34 sync with the code with have in the current copy of gcc. 2016-03-10 14:40:00 +00:00
christos
8a4b3b5da5 Do the same song and dance for functions. 2016-03-10 03:50:47 +00:00