On Sun, Jan 24 2021, Sebastien Marie <[email protected]> wrote:
> Hi,
>
> With the following (wip) diff, I am able to unbreak
> devel/spidermonkey78 on sparc64, and build it successfully.
>
> There were two differents problems:
>
> - ErrorReport.h is using va_list without including stdarg.h
>
> - rust part needs ports-gcc to build (as lang/rust is linked with llvm
>   libs and estdc++, and so search for libgcc.a, and ports-clang
>   doesn't know where to find it)
>
> For both, I need some help to proper correction :)
>
> Regarding stdarg.h, the problem seems to occurs only on
> sparc64. Others archs doesn't have this problem. I assume stdarg.h (or
> c++ counterpart) is included by some others include. I am really
> unsure about patching js/public/ErrorReport.h (which is a public API).

Explicitely including stdarg.h like you did makes sense to me, I doubt
that it will break a consumer.

> Regarding COMPILER ports-gcc changes, it will some affect others
> archs. Maybe we could set COMPILER conditionnally (.if MACHINE ==
> sparc64) ?

This should do the trick to only use ports-gcc on sparc64:
COMPILER =              base-clang ports-gcc ports-clang
MODGCC4_ARCHS =         sparc64

However,

| diff f70231781648f922592f106731742fbc994f02c4 /home/semarie/repos/ports
| blob - 1cc4370a95b301480afdab723c4176eaf66c5acb
| file + devel/spidermonkey78/Makefile
| --- devel/spidermonkey78/Makefile
| +++ devel/spidermonkey78/Makefile
| @@ -37,7 +37,7 @@ MODPY_RUNDEP =              No
|  
|  # C++11
|  # sync with SHARED_LIBS consumers: x11/gnome/gjs
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This should be kept in mind.  I don't know why ports-clang was chosen in
the first place.

| -COMPILER =           base-clang ports-clang
| +COMPILER =           base-clang ports-gcc
|  
|  USE_GMAKE =          yes
|  
| blob - /dev/null
| file + devel/spidermonkey78/patches/patch-js_public_ErrorReport_h
| --- /dev/null
| +++ devel/spidermonkey78/patches/patch-js_public_ErrorReport_h
| @@ -0,0 +1,13 @@
| +$OpenBSD$
| +
| +Index: js/public/ErrorReport.h
| +--- js/public/ErrorReport.h.orig
| ++++ js/public/ErrorReport.h
| +@@ -20,7 +20,6 @@
| + #include "mozilla/Assertions.h"  // MOZ_ASSERT
| + 
| + #include <iterator>  // std::input_iterator_tag, std::iterator
| ++#include <stdarg.h>
| + #include <stddef.h>  // size_t
| + #include <stdint.h>  // int16_t, uint16_t
| + #include <string.h>  // strlen



-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to