Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Aug 2016 01:02:44 +0200
From:      Oliver Pinter <oliver.pinter@hardenedbsd.org>
To:        Konstantin Belousov <kib@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org,  svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   Re: svn commit: r304527 - in stable/10/lib: libc/include libc/stdlib libc/tests/stdlib libthr/thread
Message-ID:  <CAPQ4ffuauCH-e41oosKvX7d422amYszSzxmMstVDQvJC8buE3w@mail.gmail.com>
In-Reply-To: <CAPQ4ffvuWa-PY4LioG8tqidUdbdwgW6iUoyRiHHeekahcEbCxA@mail.gmail.com>
References:  <201608201226.u7KCQiV6044715@repo.freebsd.org> <CAPQ4fft3L0w7Lpuw7knADvA1xqYQO=etNSzjMQK1Aw43q=2C5A@mail.gmail.com> <CAPQ4ffuJ4TmP5Sfge9JDux9FPqvtk1pTgb3debSxMuvuQbKY_g@mail.gmail.com> <CAPQ4ffvuWa-PY4LioG8tqidUdbdwgW6iUoyRiHHeekahcEbCxA@mail.gmail.com>

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

[-- Attachment #1 --]
And one more.

On 8/21/16, Oliver Pinter <oliver.pinter@hardenedbsd.org> wrote:
> On 8/21/16, Oliver Pinter <oliver.pinter@hardenedbsd.org> wrote:
>> On 8/21/16, Oliver Pinter <oliver.pinter@hardenedbsd.org> wrote:
>>> On 8/20/16, Konstantin Belousov <kib@freebsd.org> wrote:
>>>> Author: kib
>>>> Date: Sat Aug 20 12:26:44 2016
>>>> New Revision: 304527
>>>> URL: https://svnweb.freebsd.org/changeset/base/304527
>>>>
>>>> Log:
>>>>   MFC r303795:
>>>>   Add __cxa_thread_atexit(3) API implementation.
>>>>
>>>> Added:
>>>>   stable/10/lib/libc/stdlib/cxa_thread_atexit.c
>>>>      - copied unchanged from r303795,
>>>> head/lib/libc/stdlib/cxa_thread_atexit.c
>>>>   stable/10/lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc
>>>>      - copied unchanged from r303795,
>>>> head/lib/libc/tests/stdlib/cxa_thread_atexit_nothr_test.cc
>>>>   stable/10/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc
>>>>      - copied unchanged from r303795,
>>>> head/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc
>>>> Modified:
>>>>   stable/10/lib/libc/include/libc_private.h
>>>>   stable/10/lib/libc/stdlib/Makefile.inc
>>>>   stable/10/lib/libc/stdlib/Symbol.map
>>>>   stable/10/lib/libc/stdlib/exit.c
>>>>   stable/10/lib/libc/tests/stdlib/Makefile
>>>>   stable/10/lib/libthr/thread/thr_exit.c
>>>> Directory Properties:
>>>>   stable/10/   (props changed)
>>>>
>>>
>>>
>>> make[6]:
>>> "/jenkins/workspace/HardenedBSD-stable-10-STABLE-master-amd64/lib/libc/tests/stdlib/Makefile"
>>> line 3: Could not find src.opts.mk
>>> make[6]:
>>> "/jenkins/workspace/HardenedBSD-stable-10-STABLE-master-amd64/lib/libc/tests/stdlib/Makefile"
>>> line 8: Malformed conditional (${COMPILER_FEATURES:Mc++11})
>>>
>>
>
> And the next build error from the same MFC:
> 18:36:12 cxa_thread_atexit_test.o: In function `(anonymous
> namespace)::atfu_tc_cxx__thread_inf_dtors::body() const':
> 18:36:12
> /jenkins/workspace/HardenedBSD-10-STABLE-amd64/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc:(.text+0x335):
> undefined reference to `pthread_create'
> 18:36:12 cxa_thread_atexit_test.o: In function `(anonymous
> namespace)::atfu_tc_cxx__thread_local_add_while_calling_dtors::body()
> const':
> 18:36:12
> /jenkins/workspace/HardenedBSD-10-STABLE-amd64/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc:(.text+0x4b0):
> undefined reference to `pthread_create'
> 18:36:12 cxa_thread_atexit_test.o: In function `(anonymous
> namespace)::atfu_tc_cxx__thread_local_after::body() const':
> 18:36:12
> /jenkins/workspace/HardenedBSD-10-STABLE-amd64/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc:(.text+0xa50):
> undefined reference to `pthread_create'
> 18:36:12 cxa_thread_atexit_test.o: In function `(anonymous
> namespace)::atfu_tc_cxx__thread_local_before::body() const':
> 18:36:12
> /jenkins/workspace/HardenedBSD-10-STABLE-amd64/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc:(.text+0x102a):
> undefined reference to `pthread_create'
> 18:36:12 c++: error: linker command failed with exit code 1 (use -v to
> see invocation)
> 18:36:12 --- cxa_thread_atexit_test ---
> 18:36:12 *** [cxa_thread_atexit_test] Error code 1
>

[-- Attachment #2 --]
From d909c8ce534bbe4e41859db91929d15e774eeba5 Mon Sep 17 00:00:00 2001
From: Oliver Pinter <oliver.pinter@hardenedbsd.org>
Date: Sun, 21 Aug 2016 01:00:07 +0200
Subject: [PATCH] HBSD: fix build error after kib's
 8ef9c6fc5bcfe1b606229a8da024f76b2d5048c1 commit - part 2.

--8<--
18:36:12 cxa_thread_atexit_test.o: In function `(anonymous namespace)::atfu_tc_cxx__thread_inf_dtors::body() const':
18:36:12 /jenkins/workspace/HardenedBSD-10-STABLE-amd64/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc:(.text+0x335): undefined reference to `pthread_create'
18:36:12 cxa_thread_atexit_test.o: In function `(anonymous namespace)::atfu_tc_cxx__thread_local_add_while_calling_dtors::body() const':
18:36:12 /jenkins/workspace/HardenedBSD-10-STABLE-amd64/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc:(.text+0x4b0): undefined reference to `pthread_create'
18:36:12 cxa_thread_atexit_test.o: In function `(anonymous namespace)::atfu_tc_cxx__thread_local_after::body() const':
18:36:12 /jenkins/workspace/HardenedBSD-10-STABLE-amd64/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc:(.text+0xa50): undefined reference to `pthread_create'
18:36:12 cxa_thread_atexit_test.o: In function `(anonymous namespace)::atfu_tc_cxx__thread_local_before::body() const':
18:36:12 /jenkins/workspace/HardenedBSD-10-STABLE-amd64/lib/libc/tests/stdlib/cxa_thread_atexit_test.cc:(.text+0x102a): undefined reference to `pthread_create'
18:36:12 c++: error: linker command failed with exit code 1 (use -v to see invocation)
18:36:12 --- cxa_thread_atexit_test ---
18:36:12 *** [cxa_thread_atexit_test] Error code 1
--8<--

Signed-off-by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
---
 lib/libc/tests/stdlib/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/libc/tests/stdlib/Makefile b/lib/libc/tests/stdlib/Makefile
index bbb9b59..058309f 100644
--- a/lib/libc/tests/stdlib/Makefile
+++ b/lib/libc/tests/stdlib/Makefile
@@ -43,7 +43,8 @@ CFLAGS+=	-I${.CURDIR}
 
 CXXFLAGS.cxa_thread_atexit_test+=	-std=c++11
 CXXFLAGS.cxa_thread_atexit_nothr_test+=	-std=c++11
-LIBADD.cxa_thread_atexit_test+=		pthread
+DPADD.cxa_thread_atexit_nothr_test+= ${LIBPTHREAD}
+LDADD.cxa_thread_atexit_nothr_test+= -lpthread
 
 .for t in h_getopt h_getopt_long
 CFLAGS.$t+=	-I${LIBNETBSD_SRCDIR} -I${SRCTOP}/contrib/netbsd-tests
-- 
2.9.2


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPQ4ffuauCH-e41oosKvX7d422amYszSzxmMstVDQvJC8buE3w>