Monday, September 02, 2024

Re: libstdthreads on sparc64/base-gcc archs

On Sun, Sep 01, 2024 at 09:57:40PM +0200, Jeremie Courreges-Anglas wrote:

> The diff below lets libstdthreads build on sparc64. Making this build
> with base-gcc look more convoluted. Should this code move to base one
> day, we'd probably build it with clang anyway.

> FWIW __has_extension has been introduced in gcc >= 14.

> ok?

Excellent. ok kmos

--Kurt

>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/devel/libstdthreads/Makefile,v
> diff -u -p -r1.2 Makefile
> --- Makefile 21 Sep 2023 09:49:59 -0000 1.2
> +++ Makefile 1 Sep 2024 19:50:30 -0000
> @@ -13,6 +13,8 @@ SHARED_LIBS += stdthreads
> PERMIT_PACKAGE = Yes
>
> WANTLIB = pthread
> +COMPILER = base-clang ports-gcc
> +COMPILER_LANGS = c
>
> FAKE_FLAGS = LIBDIR=${TRUEPREFIX}/lib \
> MANDIR=${TRUEPREFIX}/man/man
> Index: patches/patch-threads_h
> ===================================================================
> RCS file: patches/patch-threads_h
> diff -N patches/patch-threads_h
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-threads_h 1 Sep 2024 19:50:30 -0000
> @@ -0,0 +1,16 @@
> +__has_extension support added in gcc >= 14
> +
> +Index: threads.h
> +--- threads.h.orig
> ++++ threads.h
> +@@ -45,6 +45,10 @@
> + * held.
> + */
> +
> ++#ifndef __has_extension
> ++#define __has_extension(_e) 0
> ++

No comments:

Post a Comment