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

2018-09-24 Thread Ed Maste
On 23 September 2018 at 07:31, Michael Tuexen  wrote:
> Using this patch I was able to build/install world and kernel on an i386 
> system.
> However, after removing it, I can't build world then. When trying to compile a
> kernel "the old way" I end up with:
>
> tuexen@head:~/head/sys/i386/conf % config -g TCP
> WARNING: duplicate option `GEOM_PART_GPT' encountered.
> Kernel build directory is ../compile/TCP
> Don't forget to do ``make cleandepend && make depend''
> tuexen@head:~/head/sys/i386/conf % cd ../compile/TCP/
> tuexen@head:~/head/sys/i386/compile/TCP % make -j 6
> make: "../../../conf/../../../conf/kern.pre.mk" line 126: amd64/i386 kernel 
> requires linker ifunc support
>
> This is r338893.
>
> amd64 works without any problem. So this is i386 specific. Any idea how to 
> fix it?

This safety belt is in place to ensure we don't build a non-functional
kernel - now that the i386 kernel requires ifunc support using old GNU
ld results in a kernel that doesn't boot.

The workaround for the "old way" is to explicitly set LD=ld.lld in the
environment - "LD=ld.lld make -j 6" should work. More details in this
-arch thread, when amd64 encountered this hiccup:
https://lists.freebsd.org/pipermail/freebsd-arch/2018-May/018967.html

The same issue now affects i386 as it has started using ifuncs, and
will be resolved once we can switch i386's /usr/bin/ld to be lld,
which is waiting on ports fixes in PR214864.
___
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"


aarch64 head -r338921 vs. man ld vs. ld -v : man ld describes GNU when ld is lld

2018-09-24 Thread Mark Millard via freebsd-toolchain
[This is based on buildworld buildkernel and installing.]

I've updated to:

# uname -apKU
FreeBSD pine64 12.0-ALPHA7 FreeBSD 12.0-ALPHA7 #17 r338921M: Mon Sep 24 
19:19:08 PDT 2018 
markmi@pine64:/usr/obj/cortexA53_clang/arm64.aarch64/usr/src/arm64.aarch64/sys/GENERIC-NODBG
  arm64 aarch64 1200084 1200084

For which:

# ld -v
LLD 6.0.1 (FreeBSD 335540-124) (compatible with GNU linkers)

But man ld reports GNU/BFD material:

# man ld
LD(1)GNU Development Tools   LD(1)



NAME
   ld - The GNU linker

SYNOPSIS
   ld [options] objfile ...

DESCRIPTION
. . .
   This man page does not describe the command language; see the ld entry
   in "info" for full details on the command language and on other aspects
   of the GNU linker.

   This version of ld uses the general purpose BFD libraries to operate on
   object files. . . .

   Aside from its flexibility, the GNU linker is more helpful than other
   linkers in providing diagnostic information.  . . .

   The GNU linker ld is meant to cover a broad range of situations, and to
   be as compatible as possible with other linkers.  As a result, you have
   many choices to control its behavior.
. . .

(I do not see such in my amd64 builds.)

I'm not claiming this is new: I just noticed.

For reference on the Pine64+ 2GB aarch64 system
being used for this (avoiding >>> prefixes on lines):

# 
~/sys_build_scripts.aarch64-host/make_cortexA53_nodebug_clang_bootstrap-aarch64-host.sh
 check-old
Script started, output file is 
/root/sys_typescripts/typescript_make_cortexA53_nodebug_clang_bootstrap-aarch64-host-2018-09-24:22:53:10
... Checking for old files
... Checking for old libraries
... Checking for old directories
To remove old files and directories run 'make delete-old'.
To remove old libraries run 'make delete-old-libs'.

Script done, output file is 
/root/sys_typescripts/typescript_make_cortexA53_nodebug_clang_bootstrap-aarch64-host-2018-09-24:22:53:10

(So I'd run delete-old before this.)

# more 
~/sys_build_scripts.aarch64-host/make_cortexA53_nodebug_clang_bootstrap-aarch64-host.sh
kldload -n filemon && \
script 
~/sys_typescripts/typescript_make_cortexA53_nodebug_clang_bootstrap-aarch64-host-$(date
 +%Y-%m-%d:%H:%M:%S) \
env __MAKE_CONF="/root/src.configs/make.conf" \
SRCCONF="/dev/null" 
SRC_ENV_CONF="/root/src.configs/src.conf.cortexA53-clang-bootstrap.aarch64-host"
 \
WITH_META_MODE=yes \
MAKEOBJDIRPREFIX="/usr/obj/cortexA53_clang/arm64.aarch64" \
make $*

# more ~/src.configs/src.conf.cortexA53-clang-bootstrap.aarch64-host 
TO_TYPE=aarch64
#
KERNCONF=GENERIC-NODBG
TARGET=arm64
.if ${.MAKE.LEVEL} == 0
TARGET_ARCH=${TO_TYPE}
.export TARGET_ARCH
.endif
#
#WITH_CROSS_COMPILER=
WITH_SYSTEM_COMPILER=
WITH_SYSTEM_LINKER=
#
#CPUTYPE=soft
WITH_LIBCPLUSPLUS=
#WITH_LLD_BOOTSTRAP=
WITHOUT_BINUTILS_BOOTSTRAP=
WITH_ELFTOOLCHAIN_BOOTSTRAP=
#WITH_CLANG_BOOTSTRAP=
WITH_CLANG=
WITH_CLANG_IS_CC=
WITH_CLANG_FULL=
WITH_CLANG_EXTRAS=
WITH_LLD=
WITH_LLD_IS_LD=
WITHOUT_BINUTILS=
WITH_LLDB=
#
WITH_BOOT=
WITHOUT_LIB32=
#
WITHOUT_GCC_BOOTSTRAP=
WITHOUT_GCC=
WITHOUT_GCC_IS_CC=
WITHOUT_GNUCXX=
#
NO_WERROR=
#WERROR=
MALLOC_PRODUCTION=
#
WITH_REPRODUCIBLE_BUILD=
WITH_DEBUG_FILES=
#
# Use of the .clang 's here avoids
# interfering with other CFLAGS
# usage, such as ?= usage.
CFLAGS.clang+= -mcpu=cortex-a53
CXXFLAGS.clang+= -mcpu=cortex-a53
CPPFLAGS.clang+= -mcpu=cortex-a53
ACFLAGS.arm64cpuid.S+=  -mcpu=cortex-a53+crypto
ACFLAGS.aesv8-armx.S+=  -mcpu=cortex-a53+crypto
ACFLAGS.ghashv8-armx.S+=-mcpu=cortex-a53+crypto

# more ~/src.configs/make.conf
CFLAGS.gcc+= -v
LDFLAGS.lld+= -Wl,--no-threads




===
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"