building head -r338675 with devel/amd64-gcc: /usr/local/x86_64-unknown-freebsd12.0/bin/ld: warning: -z ifunc-noplt ignored

2018-09-20 Thread Mark Millard via freebsd-toolchain
In looking into another report about using devel/amd64-gcc to buld
head I tried a build of -r338675 ( with WERROR= ). It got:

--- kernel.full ---
linking kernel.full
/usr/local/x86_64-unknown-freebsd12.0/bin/ld: warning: -z ifunc-noplt ignored.
ctfmerge -L VERSION -g -o kernel.full ...
   textdata bss dec hex filename
23518632117710305673808 409634702710d8e kernel.full
Building 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/sys/GENERIC-NODBG/kernel.debug
Building 
/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/sys/GENERIC-NODBG/kernel
--
>>> Kernel build for GENERIC-NODBG completed on Thu Sep 20 18:38:29 PDT 2018
--


Question:

Is ignoring "-z ifunc-noplt" a problem for using what
is built?


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


devel/xtoolchain-llvm70 based buildkernel for head -r338675 fails: if_fxp.c:1630:3: error: array index -1 is before the beginning of the array

2018-09-20 Thread Mark Millard via freebsd-toolchain
This was targeting amd64.

--- if_fxp.o ---
/usr/src/sys/dev/fxp/if_fxp.c:1630:3: error: array index -1 is before the 
beginning of the array [-Werror,-Warray-bounds]
cbp->tbd[-1].tb_size = htole32(m->m_pkthdr.tso_segsz << 16);
^~~
/usr/src/sys/dev/fxp/if_fxpreg.h:297:3: note: array 'tbd' declared here
struct fxp_tbd tbd[FXP_NTXSEG + 1];
^
1 error generated.
*** [if_fxp.o] Error code 1

make[4]: stopped in /usr/src/sys/modules/fxp
.ERROR_TARGET='if_fxp.o'
.ERROR_META_FILE='/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64/sys/GENERIC-NODBG/modules/usr/src/sys/modules/fxp/if_fxp.o.meta'
.MAKE.LEVEL='4'
MAKEFILE=''
.MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
_ERROR_CMD='/usr/local/bin/clang70 -target x86_64-unknown-freebsd12.0 
--sysroot=/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64/tmp 
-B/var/empty  -O2 -pipe  -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE 
-DKLD_TIED -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include 
/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64/sys/GENERIC-NODBG/opt_global.h
 -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common -g 
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer 
-I/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64/sys/GENERIC-NODBG
   -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  
-fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector 
-gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes 
-Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign 
-D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs 
-fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compa
 re -Wno-error-empty-body -Wno-error-parentheses-equality 
-Wno-error-unused-function -Wno-error-pointer-sign 
-Wno-error-shift-negative-value -Wno-address-of-packed-member  -mno-aes 
-mno-avx  -std=iso9899:1999 -c /usr/src/sys/dev/fxp/if_fxp.c -o if_fxp.o; 
ctfconvert -L VERSION -g if_fxp.o;'
.CURDIR='/usr/src/sys/modules/fxp'
.MAKE='make'
.OBJDIR='/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64/sys/GENERIC-NODBG/modules/usr/src/sys/modules/fxp'
.TARGETS='all'
DESTDIR=''
LD_LIBRARY_PATH=''
MACHINE='amd64'
MACHINE_ARCH='amd64'
MAKEOBJDIRPREFIX='/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64/sys/GENERIC-NODBG/modules'
MAKESYSPATH='/usr/src/share/mk'
MAKE_VERSION='20180512'
PATH='/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64/tmp/legacy/usr/bin:/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64/tmp/legacy/bin:/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64/tmp/usr/sbin:/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin'
SRCTOP='/usr/src'
OBJTOP='/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64/sys/GENERIC-NODBG/modules/usr/src'
.MAKE.MAKEFILES='/usr/src/share/mk/sys.mk /usr/src/share/mk/local.sys.env.mk 
/usr/src/share/mk/src.sys.env.mk 
/root/src.configs/src.conf.amd64-xtoolchain-llvm.amd64-host 
/usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/src.sys.obj.mk 
/usr/src/share/mk/auto.obj.mk /usr/src/share/mk/bsd.suffixes.mk 
/root/src.configs/make.conf /usr/src/share/mk/local.sys.mk 
/usr/src/share/mk/src.sys.mk /dev/null /usr/src/sys/modules/fxp/Makefile 
/usr/src/share/mk/bsd.kmod.mk /usr/src/sys/conf/kmod.mk 
/usr/src/share/mk/bsd.init.mk /usr/src/share/mk/bsd.opts.mk 
/usr/src/share/mk/bsd.cpu.mk /usr/src/share/mk/local.init.mk 
/usr/src/share/mk/src.init.mk /usr/src/sys/modules/fxp/../Makefile.inc 
/usr/src/share/mk/bsd.own.mk /usr/src/share/mk/bsd.compiler.mk 
/usr/src/share/mk/bsd.linker.mk /usr/src/sys/conf/kern.opts.mk 
/usr/src/sys/conf/config.mk /usr/src/share/mk/bsd.links.mk 
/usr/src/share/mk/bsd.dep.mk /usr/src/share/mk/bsd.clang-analyze.mk 
/usr/src/share/mk/bsd.obj.mk /usr/src/share/mk/bsd.subdir.mk /usr/s
 rc/sys/conf/kern.mk'
.PATH='. /usr/src/sys/modules/fxp /usr/src/sys/dev/fxp 
/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64/sys/GENERIC-NODBG'
1 error



/usr/src/sys/dev/fxp/if_fxpreg.h:297 is in:

struct fxp_cb_tx {
uint16_t cb_status;
uint16_t cb_command;
uint32_t link_addr;
uint32_t tbd_array_addr;
uint16_t byte_count;
uint8_t tx_threshold;
uint8_t tbd_number;
 
/*
 * The following structure isn't actually part of the TxCB,
 * unless the extended TxCB feature is being used.  In this
 * case, the first two elements of the structure below are
 * fetched along with the TxCB.
 */
union {
struct fxp_ipcb ipcb;
struct fxp_tbd tbd[FXP_NTXSEG + 1];
} tx_cb_u;
};


/usr/src/sys/dev/fxp/if_fxp.c:1630 is in:

/* Configure TSO. */
if (m->m

Re: svn commit: r480180 - in head/devel: . xtoolchain-llvm70 [FYI: 2 ABI changes compared to older clangs]

2018-09-20 Thread Mark Millard via freebsd-toolchain
When I looked at 
http://releases.llvm.org/7.0.0/tools/clang/docs/ReleaseNotes.html
I found notes about 2 ABI breakages compared to clang 6 and before:

QUOTE
• Clang’s handling of the GCC packed class attribute in C++ has been 
fixed to apply only to non-static data members and not to base classes. This 
fixes an ABI difference between Clang and GCC, but creates an ABI difference 
between Clang 7 and earlier versions. The old behavior can be restored by 
setting -fclang-abi-compat to 6 or lower.

• Clang implements the proposed resolution of LWG issue 2358, along 
with the corresponding change to the Itanium C++ ABI, which make classes 
containing only unnamed non-zero-length bit-fields be considered non-empty. 
This is an ABI break compared to prior Clang releases, but makes Clang generate 
code that is ABI-compatible with other compilers. The old behavior can be 
restored by setting -fclang-abi-compat to 6 or lower.
END QUOTE



Also it reports:

QUOTE
libc++ Changes

Users that wish to link together translation units built with different 
versions of libc++’s headers into the same final linked image should define the 
_LIBCPP_HIDE_FROM_ABI_PER_TU macro to 1 when building those translation units. 
In a future release, not defining _LIBCPP_HIDE_FROM_ABI_PER_TU to 1 and linking 
translation units built with different versions of libc++’s headers together 
may lead to ODR violations and ABI issues.
END QUOTE



===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

___
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"