Bug 249300 - 12-STABLE: compiler error in "buildworld": ld error: arith_yylex.c
Summary: 12-STABLE: compiler error in "buildworld": ld error: arith_yylex.c
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-14 05:17 UTC by O. Hartmann
Modified: 2020-09-14 05:18 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2020-09-14 05:17:55 UTC
Recent 12-STABE, r365705, fails to compile, after upgrading /usr/src from r365684 with a compiler error, as shown below.

[...]
===> bin/sh (all)
cc -target x86_64-unknown-freebsd13.0 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -O2 -pipe -O3 -fno-common -march=native -DSHELL -I. -I/usr/src/bin/sh -DNDEBUG -fPIE -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments  -pie   -o sh alias.o arith_yacc.o arith_yylex.o cd.o echo.o error.o eval.o exec.o expand.o histedit.o input.o jobs.o kill.o mail.o main.o memalloc.o miscbltin.o mystring.o options.o output.o parser.o printf.o redir.o show.o test.o trap.o var.o builtins.o nodes.o syntax.o   -ledit 
ld: error: can't create dynamic relocation R_X86_64_32S against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in arith_yylex.o
>>> referenced by arith_yylex.c
>>>               arith_yylex.o:(yylex)

ld: error: can't create dynamic relocation R_X86_64_64 against local symbol in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in arith_yylex.o
>>> referenced by arith_yylex.c
>>>               arith_yylex.o:(.rodata+0x0)