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



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