Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Mar 2023 16:45:10 +0200
From:      Luca Pizzamiglio <pizzamig@freebsd.org>
To:        Daniel Engberg <diizzy@freebsd.org>
Cc:        ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org,  dev-commits-ports-main@freebsd.org
Subject:   Re: git: 1453ec9ec99d - main - benchmarks/unixbench: Fix arm64 build
Message-ID:  <CAB88xy8qyUZysDX4gD3G=Gt_zp5YBeHvSAwnFsyJZeN25rnweA@mail.gmail.com>
In-Reply-To: <CAB88xy-873z63G2LTcgpw1vWzq2gLDWAPy3jgsfP8f-Cq8H_4w@mail.gmail.com>
References:  <202303261149.32QBnc5d024941@gitrepo.freebsd.org> <906fc94ce07248d8aa56678fcc1b178b@FreeBSD.org> <CAB88xy-873z63G2LTcgpw1vWzq2gLDWAPy3jgsfP8f-Cq8H_4w@mail.gmail.com>

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

[-- Attachment #1 --]
Changed my mind. going to remove mtune as default.
Only leaving the option to enable march (disabled by default).

Best regards,
Luca

On Sun, Mar 26, 2023 at 4:43 PM Luca Pizzamiglio <pizzamig@freebsd.org>
wrote:

> Thanks for the suggestions!
> I'm leaving mtune as default, and adding an option to enable march.
>
> mtune is expected to not create broken packages.
> Am I correct?
>
> Best regards,
> Luca
>
>
> On Sun, Mar 26, 2023 at 1:58 PM Daniel Engberg <diizzy@freebsd.org> wrote:
>
>> On 2023-03-26 13:49, Luca Pizzamiglio wrote:
>> > The branch main has been updated by pizzamig:
>> >
>> > URL:
>> >
>> https://cgit.FreeBSD.org/ports/commit/?id=1453ec9ec99d5025678acb403c9f84c7beb6dbd5
>> >
>> > commit 1453ec9ec99d5025678acb403c9f84c7beb6dbd5
>> > Author:     Luca Pizzamiglio <pizzamig@FreeBSD.org>
>> > AuthorDate: 2023-03-26 11:49:14 +0000
>> > Commit:     Luca Pizzamiglio <pizzamig@FreeBSD.org>
>> > CommitDate: 2023-03-26 11:49:14 +0000
>> >
>> >     benchmarks/unixbench: Fix arm64 build
>> >
>> >     On arm64, some cflags are not supported.
>> > ---
>> >  benchmarks/unixbench/files/patch-Makefile | 21 +++++++--------------
>> >  1 file changed, 7 insertions(+), 14 deletions(-)
>> >
>> > diff --git a/benchmarks/unixbench/files/patch-Makefile
>> > b/benchmarks/unixbench/files/patch-Makefile
>> > index 282945fef972..3c2539dc046d 100644
>> > --- a/benchmarks/unixbench/files/patch-Makefile
>> > +++ b/benchmarks/unixbench/files/patch-Makefile
>> > @@ -1,5 +1,5 @@
>> >  --- Makefile.orig    2023-02-07 23:18:07.000000000 +0100
>> > -+++ Makefile 2023-02-09 21:57:42.966634000 +0100
>> > ++++ Makefile 2023-03-26 13:40:57.699042000 +0200
>> >  @@ -46,7 +46,7 @@
>> >   # X11 libraries on your system. (e.g. libX11-devel mesa-libGL-devel)
>> >   #
>> > @@ -18,22 +18,15 @@
>> >
>> >   # OPTIMISATION SETTINGS:
>> >   # Use gcc option if defined UB_GCC_OPTIONS via "Environment
>> > variable" or "Command-line arguments".
>> > -@@ -87,7 +87,7 @@
>> > -   ## (-ffast-math) disables strict IEEE or ISO rules/specifications
>> > for math funcs
>> > -   OPTON = -O3 -ffast-math
>> > -
>> > --  ## OS detection.  Comment out if gmake syntax not supported by
>> > other 'make'.
>> > -+  ## OS detection.  Comment out if gmake syntax not supported by
>> > other 'make'.
>> > -   OSNAME:=$(shell uname -s)
>> > -   ARCH := $(shell uname -p)
>> > -   ifeq ($(OSNAME),Linux)
>> > -@@ -113,6 +113,9 @@
>> > +@@ -113,6 +113,13 @@
>> >       CFLAGS += -Wa,-q
>> >     endif
>> >
>> >  +  ifeq ($(OSNAME),FreeBSD)
>> > -+    OPTON += -march=native -mtune=native -fomit-frame-pointer
>> > ++    ifeq ($(ARCH),aarch64)
>> > ++      OPTON += -fomit-frame-pointer
>> > ++    else
>> > ++      OPTON += -march=native -mtune=native -fomit-frame-pointer
>> > ++    endif
>> >  +  endif
>> >   endif
>> > -
>> > -
>>
>> Hi,
>>
>> Please remove -march=native as it will break on x86/amd64 for packaging.
>> Either add it as a menu option or just rely on ports framework (CPUTYPE
>> in make.conf).
>>
>> Best regards,
>> Daniel
>>
>

[-- Attachment #2 --]
<div dir="ltr"><div>Changed my mind. going to remove mtune as default.<br></div><div>Only leaving the option to enable march (disabled by default).</div><div><br></div><div>Best regards,</div><div>Luca<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 26, 2023 at 4:43 PM Luca Pizzamiglio &lt;<a href="mailto:pizzamig@freebsd.org">pizzamig@freebsd.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thanks for the suggestions!<br>I&#39;m leaving mtune as default, and adding an option to enable march.<br><div><br></div><div>mtune is expected to not create broken packages.</div><div>Am I correct?<br><br></div><div>Best regards,<br></div><div>Luca<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 26, 2023 at 1:58 PM Daniel Engberg &lt;<a href="mailto:diizzy@freebsd.org" target="_blank">diizzy@freebsd.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2023-03-26 13:49, Luca Pizzamiglio wrote:<br>
&gt; The branch main has been updated by pizzamig:<br>
&gt; <br>
&gt; URL:<br>
&gt; <a href="https://cgit.FreeBSD.org/ports/commit/?id=1453ec9ec99d5025678acb403c9f84c7beb6dbd5" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/ports/commit/?id=1453ec9ec99d5025678acb403c9f84c7beb6dbd5</a><br>;
&gt; <br>
&gt; commit 1453ec9ec99d5025678acb403c9f84c7beb6dbd5<br>
&gt; Author:     Luca Pizzamiglio &lt;pizzamig@FreeBSD.org&gt;<br>
&gt; AuthorDate: 2023-03-26 11:49:14 +0000<br>
&gt; Commit:     Luca Pizzamiglio &lt;pizzamig@FreeBSD.org&gt;<br>
&gt; CommitDate: 2023-03-26 11:49:14 +0000<br>
&gt; <br>
&gt;     benchmarks/unixbench: Fix arm64 build<br>
&gt; <br>
&gt;     On arm64, some cflags are not supported.<br>
&gt; ---<br>
&gt;  benchmarks/unixbench/files/patch-Makefile | 21 +++++++--------------<br>
&gt;  1 file changed, 7 insertions(+), 14 deletions(-)<br>
&gt; <br>
&gt; diff --git a/benchmarks/unixbench/files/patch-Makefile<br>
&gt; b/benchmarks/unixbench/files/patch-Makefile<br>
&gt; index 282945fef972..3c2539dc046d 100644<br>
&gt; --- a/benchmarks/unixbench/files/patch-Makefile<br>
&gt; +++ b/benchmarks/unixbench/files/patch-Makefile<br>
&gt; @@ -1,5 +1,5 @@<br>
&gt;  --- Makefile.orig    2023-02-07 23:18:07.000000000 +0100<br>
&gt; -+++ Makefile 2023-02-09 21:57:42.966634000 +0100<br>
&gt; ++++ Makefile 2023-03-26 13:40:57.699042000 +0200<br>
&gt;  @@ -46,7 +46,7 @@<br>
&gt;   # X11 libraries on your system. (e.g. libX11-devel mesa-libGL-devel)<br>
&gt;   #<br>
&gt; @@ -18,22 +18,15 @@<br>
&gt; <br>
&gt;   # OPTIMISATION SETTINGS:<br>
&gt;   # Use gcc option if defined UB_GCC_OPTIONS via &quot;Environment<br>
&gt; variable&quot; or &quot;Command-line arguments&quot;.<br>
&gt; -@@ -87,7 +87,7 @@<br>
&gt; -   ## (-ffast-math) disables strict IEEE or ISO rules/specifications<br>
&gt; for math funcs<br>
&gt; -   OPTON = -O3 -ffast-math<br>
&gt; -<br>
&gt; --  ## OS detection.  Comment out if gmake syntax not supported by<br>
&gt; other &#39;make&#39;.<br>
&gt; -+  ## OS detection.  Comment out if gmake syntax not supported by <br>
&gt; other &#39;make&#39;.<br>
&gt; -   OSNAME:=$(shell uname -s)<br>
&gt; -   ARCH := $(shell uname -p)<br>
&gt; -   ifeq ($(OSNAME),Linux)<br>
&gt; -@@ -113,6 +113,9 @@<br>
&gt; +@@ -113,6 +113,13 @@<br>
&gt;       CFLAGS += -Wa,-q<br>
&gt;     endif<br>
&gt; <br>
&gt;  +  ifeq ($(OSNAME),FreeBSD)<br>
&gt; -+    OPTON += -march=native -mtune=native -fomit-frame-pointer<br>
&gt; ++    ifeq ($(ARCH),aarch64)<br>
&gt; ++      OPTON += -fomit-frame-pointer<br>
&gt; ++    else<br>
&gt; ++      OPTON += -march=native -mtune=native -fomit-frame-pointer<br>
&gt; ++    endif<br>
&gt;  +  endif<br>
&gt;   endif<br>
&gt; -<br>
&gt; -<br>
<br>
Hi,<br>
<br>
Please remove -march=native as it will break on x86/amd64 for packaging. <br>
Either add it as a menu option or just rely on ports framework (CPUTYPE <br>
in make.conf).<br>
<br>
Best regards,<br>
Daniel<br>
</blockquote></div>
</blockquote></div>
home | help

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