NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-i386/61069: gcc 12.5 on NetBSD 11.1 i386 fails to compile GLSMAC Github project



I understand (and support) keeping older architectures supported.
And am willing to sacrifice some speed, but find being able to
distribute takes precedence, when I need to guarantee it works on x86,
even if that means setting the bar a bit higher than netbsd would. This
project, as written, requires pentium based on your advice, so other
than learning to code to refactor it, I have no other choice.

On Fri, 27 Nov 2026 09:35:01 +0000 (UTC)
"RVP via gnats" <gnats-admin%NetBSD.org@localhost> wrote:

> The following reply was made to PR port-i386/61069; it has been noted
> by GNATS.
> 
> From: RVP <rvp%SDF.ORG@localhost>
> To: gnats-bugs%netbsd.org@localhost
> Cc: 
> Subject: Re: port-i386/61069: gcc 12.5 on NetBSD 11.1 i386 fails to
> compile GLSMAC Github project
> Date: Fri, 27 Nov 2026 09:33:28 +0000 (UTC)
> 
>  On Fri, 27 Nov 2026, Lubomir G. Diakov via gnats wrote:
>  
>  > GLSMAC builds with CMake, thus I modified CMakeLists.txt with a
>  > stanza to force march=pentium if i486 is detected. Of course that
>  > means almost certainly incompatible with anything below a pentium,
>  > and it may compile pentium code even with a newer CPU, but the
>  > error is gone.
>  >
>  > complete:
>  > #LGD, conditional cmake adds march=pentium, 486 fails on atomic
>  > long long types! include(CheckCXXCompilerFlag)
>  > CHECK_CXX_COMPILER_FLAG("-march=i486" COMPILER_SUPPORTS_MARCH_i486)
>  > if(COMPILER_SUPPORTS_MARCH_i486)
>  >     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=pentium")
>  >     message(STATUS "Pentium CPU or above, 486 fails on atomic long
>  > long types!. -march=pentium.") endif()
>  >
>  > Any refinements to exclude newer CPUs or suggestions how to force
>  > gcc to default to march=pentium at an OS level, systemwide, not
>  > just in CMake gladly accepted.
>  >  
>  
>  The NetBSD folks're unlikely to bump `-march=' to i486+ because i486
> is still supported. What you could do is use `-march=native' if you
> want speed... But, you wouldn't be able to distribute built like
> that... 
>  -RVP
>  




Home | Main Index | Thread Index | Old Index