On Mon, Oct 16, 2023 at 10:51:37PM +0200, Theo Buehler wrote:
> sorry for missing that.
> 
> we should keep the existing CXXFLAGS, especially -O2 -pipe.  This diff
> no dynamic export changes and doesn't change sizees:
> 
> 38075   1648    40      39763   9b53    ../build-amd64/libsnappy.so
> 38075   1648    40      39763   9b53    ../build-amd64/libsnappy.so.3.0

Oh I see, you forced CXXFLAGS instead of amending them.

Still, I'd be happier do to this only where needed such that potential
future bugs won't get fixed silently by that.

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/archivers/snappy/Makefile,v
> retrieving revision 1.19
> diff -u -p -r1.19 Makefile
> --- Makefile  16 Oct 2023 20:31:13 -0000      1.19
> +++ Makefile  16 Oct 2023 20:49:09 -0000
> @@ -3,7 +3,7 @@ COMMENT =     fast compression/decompression
>  GH_TAGNAME = 1.1.10
>  GH_PROJECT = snappy
>  GH_ACCOUNT = google
> -REVISION =   0
> +REVISION =   1
>  
>  SHARED_LIBS =        snappy  3.0
>  
> @@ -24,6 +24,8 @@ MODULES =           devel/cmake
>  CONFIGURE_ARGS +=    -DBUILD_SHARED_LIBS=ON \
>                       -DINSTALL_GTEST=OFF \
>                       -DSNAPPY_BUILD_BENCHMARKS=OFF
> +
> +CONFIGURE_ENV +=     CXXFLAGS="${CXXFLAGS} -I${LOCALBASE}/include"

CXXFLAGS +=     -I/usr/local/include

This is enough and gets picked up by cmake.

OK kn when that works on sparc64 for you and got wrapped in a
CHOSEN_COMPILER or MACHINE_ARCH check.

>  
>  # expects submodule/cannot use system library
>  DIST_TUPLE =         github  google  googletest      
> e40661d89b051e9ef4eb8a2420b74bf78b39ef41 \
> Index: patches/patch-third_party_googletest_googletest_src_gtest_cc
> ===================================================================
> RCS file: patches/patch-third_party_googletest_googletest_src_gtest_cc
> diff -N patches/patch-third_party_googletest_googletest_src_gtest_cc
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-third_party_googletest_googletest_src_gtest_cc      16 Oct 
> 2023 20:49:09 -0000
> @@ -0,0 +1,17 @@
> +Fix build on sparc64:
> +
> +gtest.cc:5342:7:
> + error: 'raise' was not declared in this scope
> +       raise(SIGTRAP);
> +
> +Index: third_party/googletest/googletest/src/gtest.cc
> +--- third_party/googletest/googletest/src/gtest.cc.orig
> ++++ third_party/googletest/googletest/src/gtest.cc
> +@@ -43,6 +43,7 @@
> + #include <algorithm>
> + #include <chrono>  // NOLINT
> + #include <cmath>
> ++#include <csignal>
> + #include <cstdint>
> + #include <cstdlib>
> + #include <cstring>
> 

Reply via email to