Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Nov 2019 20:18:52 -0800
From:      Pete Wright <pete@nomadlogic.org>
To:        Glen Barber <gjb@freebsd.org>
Cc:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: breakage at usr.sbin/jail/Makefile
Message-ID:  <38318920-7d3b-ee08-b0d0-d6e04e03c6a3@nomadlogic.org>
In-Reply-To: <20191121041317.GL5599@FreeBSD.org>
References:  <0e3dd332-91d7-0aa1-43cb-43528db7c63a@nomadlogic.org> <20191121041317.GL5599@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help


On 11/20/19 8:13 PM, Glen Barber wrote:
> On Wed, Nov 20, 2019 at 07:57:57PM -0800, Pete Wright wrote:
>> Hello,
>> looks like some of the recent commits to usr.sbin/jail/Makefile has broken
>> CURRENT.  I am getting this error when attempting a buildworld:
>>
>> ===> usr.sbin/jail (cleandir)
>> make[4]: "/usr/home/pete/git/freebsd/usr.sbin/jail/Makefile" line 21:
>> Malformed conditional (${LINKER_TYPE} == "bfd" && ${MACHINE} == "riscv")
>> make[4]: Fatal errors encountered -- cannot continue
>> make[4]: stopped in /usr/home/pete/git/freebsd/usr.sbin/jail
>> *** [cleandir_subdir_usr.sbin/jail] Error code 1
>>
>>
>> here's the code in question:
>>   18 # workaround for GNU ld (GNU Binutils) 2.33.1:
>>   19 #   relocation truncated to fit: R_RISCV_GPREL_I against `.LANCHOR2'
>>   20 # https://bugs.freebsd.org/242109
>>   21 .if ${LINKER_TYPE} == "bfd" && ${MACHINE} == "riscv"
>>   22 CFLAGS+=-Wl,--no-relax
>>   23 .endif
>>
>>
>> looks like Ed Maste caught this already in the
>> https://bugs.freebsd.org/242109 but wanted to flag it here as well in case
>> anyone else runs into this in the hopes it saves some debugging time :)
>>
> Reverted out of frustration in r354935.

thanks!

the issue seems to be on my amd64 system ${LINKER_TYPE} is not defined.  
i was contemplating suggesting updating the .if clause in the Makefile 
like so:

.if defined($LINKER_TYPE}) && ${LINKER_TYPE} == "bfd" && ${MACHINE} == 
"riscv"


it allows things to compile on my end, but i'm not sure this is best way 
to resolve this issue.

-p


-- 
Pete Wright
pete@nomadlogic.org
@nomadlogicLA




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38318920-7d3b-ee08-b0d0-d6e04e03c6a3>