From owner-freebsd-hackers@freebsd.org Mon Mar 4 17:14:01 2019 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9EE9151B015 for ; Mon, 4 Mar 2019 17:14:01 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA65773A44 for ; Mon, 4 Mar 2019 17:14:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id x24HDqxr095713 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 4 Mar 2019 19:13:55 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua x24HDqxr095713 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id x24HDpZF095712; Mon, 4 Mar 2019 19:13:51 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 4 Mar 2019 19:13:51 +0200 From: Konstantin Belousov To: Anthony Pankov Cc: Anthony Pankov via freebsd-hackers Subject: Re: building with WITHOUT_SSP side effect Message-ID: <20190304171351.GQ68879@kib.kiev.ua> References: <434119194.20190304190732@mail.ru> <1122478880.20190304195602@mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1122478880.20190304195602@mail.ru> User-Agent: Mutt/1.11.3 (2019-02-01) X-Spam-Status: No, score=0.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM,FREEMAIL_REPLY, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on tom.home X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Mar 2019 17:14:02 -0000 On Mon, Mar 04, 2019 at 07:56:02PM +0300, Anthony Pankov via freebsd-hackers wrote: > It seems that world builded with WITHOUT_SSP=yes loose ability to > build anything. > > # cc -v test.c > FreeBSD clang version 7.0.1 (tags/RELEASE_701/final 349250) (based on LLVM 7.0.1) > Target: x86_64-unknown-freebsd11.2 > Thread model: posix > InstalledDir: /usr/bin > "/usr/bin/cc" -cc1 -triple x86_64-unknown-freebsd11.2 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name test.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -v -resource-dir /usr/lib/clang/7.0.1 -fdebug-compilation-dir /root/test -ferror-limit 19 -fmessage-length 90 -fobjc-runtime=gnustep -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/test-d853d1.o -x c test.c -faddrsig > clang -cc1 version 7.0.1 based upon LLVM 7.0.1 default target x86_64-unknown-freebsd11.2 > #include "..." search starts here: > #include <...> search starts here: > /usr/lib/clang/7.0.1/include > /usr/include > End of search list. > "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o a.out /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib /tmp/test-d853d1.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o > /usr/bin/ld: cannot find /usr/lib/libssp_nonshared.a It seems that you installed without specifying WITHOUT_SSP, which ended up installing wrong linker script as libc.a. Either create dummy libssp_nonshared.a, or reinstall libc.a (look at lib/libc/Makefile for SHLIB_LDSCRIPT), or reinstall the world. > > > > Greetings, > > > I've builded 11-stable ( 11.2-STABLE r344696) from source with option > > WITHOUT_SSP="yes" in src.conf. > > > Installing kernel and world was OK. But when I tried to build from port it give me an error: > > configure: error: in `/usr/ports/ports-mgmt/pkg/work/pkg-1.10.5': > > configure: error: C compiler cannot create executables > > > config.log: > > ... > > configure:3555: cc -v >&5 > > FreeBSD clang version 7.0.1 (tags/RELEASE_701/final 349250) (based on LLVM 7.0.1) > > Target: x86_64-unknown-freebsd11.2 > > ... > > configure:3608: cc -O2 -pipe -Wno-error -fno-strict-aliasing conftest.c >&5 > > /usr/bin/ld: cannot find /usr/lib/libssp_nonshared.a > > cc: error: linker command failed with exit code 1 (use -v to see invocation) > > > And yes, there is SSP_UNSAFE=yes in make.conf > > > Is this a bug or feature? > > > > > -- > Best regards, > Anthony Pankov mailto:ap00@mail.ru > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"