Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Feb 2018 20:04:39 -0800
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        Jan Beich <jbeich@FreeBSD.org>, ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   Re: svn commit: r462646 - head/lang/rust/files
Message-ID:  <c455aa47-21f9-26d6-629a-94108d8066bf@FreeBSD.org>
In-Reply-To: <201802222205.w1MM5LjB071448@repo.freebsd.org>
References:  <201802222205.w1MM5LjB071448@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--K44ohHDPLiSqy9xnbALWQdBnfQKSPLthM
Content-Type: multipart/mixed; boundary="14oysGREniFng4wvlNgLwo4HYU9kV8idS";
 protected-headers="v1"
From: Bryan Drewery <bdrewery@FreeBSD.org>
To: Jan Beich <jbeich@FreeBSD.org>, ports-committers@freebsd.org,
 svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Message-ID: <c455aa47-21f9-26d6-629a-94108d8066bf@FreeBSD.org>
Subject: Re: svn commit: r462646 - head/lang/rust/files
References: <201802222205.w1MM5LjB071448@repo.freebsd.org>
In-Reply-To: <201802222205.w1MM5LjB071448@repo.freebsd.org>

--14oysGREniFng4wvlNgLwo4HYU9kV8idS
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable

On 2/22/18 2:05 PM, Jan Beich wrote:
> Author: jbeich
> Date: Thu Feb 22 22:05:21 2018
> New Revision: 462646
> URL: https://svnweb.freebsd.org/changeset/ports/462646
>=20
> Log:
>   lang/rust: unbreak on aarch64 after r459911
>  =20
>   gmake: Leaving directory '.../aarch64-unknown-freebsd/release/build/r=
ustc_binaryen-cfb76adb9420e94c/out/build'
>   --- stderr
>   c++: error: the clang compiler does not support '-march=3Dnative'
>   c++: error: the clang compiler does not support '-march=3Dnative'
>  =20
>   PR:		225600
>   Reported by:	Gergely Czuczy, pkg-fallout
>   Obtained from:	upstream (binaryen 1.37.35)
>   Approved by:	portmgr blanket

Please submit patches upstream. Especially for this project it is
infuriating that building from git or using rustup doesn't work.

>=20
> Added:
>   head/lang/rust/files/patch-src_binaryen_CMakeLists.txt   (contents, p=
rops changed)
>=20
> Added: head/lang/rust/files/patch-src_binaryen_CMakeLists.txt
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ head/lang/rust/files/patch-src_binaryen_CMakeLists.txt	Thu Feb 22 2=
2:05:21 2018	(r462646)
> @@ -0,0 +1,60 @@
> +https://github.com/WebAssembly/binaryen/commit/07f6dfbf0d89
> +https://github.com/WebAssembly/binaryen/commit/d9692277357b
> +
> +--- src/binaryen/CMakeLists.txt.orig	2018-02-12 18:56:16 UTC
> ++++ src/binaryen/CMakeLists.txt
> +@@ -99,51 +99,12 @@ ELSE()
> +   FIND_PACKAGE(Threads REQUIRED)
> +   ADD_CXX_FLAG("-std=3Dc++11")
> +   if (NOT EMSCRIPTEN)
> +-    # try to get the target architecture by compiling a dummy.c file =
and
> +-    # checking the architecture using the file command.
> +-    file(WRITE ${PROJECT_BINARY_DIR}/dummy.c "main(){}")
> +-    try_compile(
> +-      COMPILE_OK
> +-      ${PROJECT_BINARY_DIR}
> +-      ${PROJECT_BINARY_DIR}/dummy.c
> +-      OUTPUT_VARIABLE COMPILE_OUTPUT
> +-      COPY_FILE ${PROJECT_BINARY_DIR}/dummy
> +-    )
> +-    if (COMPILE_OK)
> +-      execute_process(
> +-        COMMAND file ${PROJECT_BINARY_DIR}/dummy
> +-        RESULT_VARIABLE FILE_RESULT
> +-        OUTPUT_VARIABLE FILE_OUTPUT
> +-        ERROR_QUIET
> +-      )
> +-
> +-      if (FILE_RESULT EQUAL 0)
> +-        if (${FILE_OUTPUT} MATCHES "x86[-_]64")
> +-          set(TARGET_ARCH "x86-64")
> +-        elseif (${FILE_OUTPUT} MATCHES "Intel 80386")
> +-          set(TARGET_ARCH "i386")
> +-        elseif (${FILE_OUTPUT} MATCHES "ARM")
> +-          set(TARGET_ARCH "ARM")
> +-        else ()
> +-          message(WARNING "Unknown target architecture!")
> +-        endif ()
> +-        if(TARGET_ARCH)
> +-          MESSAGE(STATUS "Building for platform ${TARGET_ARCH}")
> +-        endif ()
> +-      else ()
> +-        message(WARNING "Error running file on dummy executable")
> +-      endif ()
> +-    else ()
> +-      message(WARNING "Error compiling dummy.c file: ${COMPILE_OUTPUT=
}")
> +-    endif ()
> +-
> +-    if (TARGET_ARCH STREQUAL "i386")
> ++    if (CMAKE_SYSTEM_PROCESSOR MATCHES "^i.86$")
> +       # wasm doesn't allow for x87 floating point math
> +       ADD_COMPILE_FLAG("-msse2")
> +       ADD_COMPILE_FLAG("-mfpmath=3Dsse")
> +-    elseif(TARGET_ARCH STREQUAL "ARM")
> +-      # stub for ARM-specific instructions. GCC6 adds NEON with the b=
elow flags
> +-      ADD_COMPILE_FLAG("-march=3Dnative")
> ++    elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^armv[2-6]" AND NOT CMAKE=
_CXX_FLAGS MATCHES "-mfpu=3D")
> ++      ADD_COMPILE_FLAG("-mfpu=3Dvfpv3")
> +     endif ()
> +   endif ()
> +   ADD_COMPILE_FLAG("-Wall")
>=20


--=20
Regards,
Bryan Drewery


--14oysGREniFng4wvlNgLwo4HYU9kV8idS--

--K44ohHDPLiSqy9xnbALWQdBnfQKSPLthM
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEE+Rc8ssOq6npcih8JNddxu25Gl88FAlqQ5FcACgkQNddxu25G
l8++EwgAlrmx/EA2DIwBhuU/UbFebNC7wvvRb5WilyDEyPuDFP1ZfRtFPrB0CQYb
WuD/HukuCwiAY+RbaXWVGszGi4nSjr449gv5cvgykUdYMJ5/KjEQuhINAT3Mz8f6
fESZ6xO0ENAJsT4IMoos/mSWtB7NZDg+jp98pbyfWCOjj5TIFNaJG/tH9rrZGt15
sJQ5MrPmUSz/GScdDLIHSDKyd+R2eSDxIeqqoWeZ91VOidweiiCRUG86eG631z5A
K8paJJs2OyCecyeFqtn0gnjXARSSWBiURcysQ4K9Cx1GeZUzyJdQwsWA6x5c3rA5
Pq20RnlNLP1LM5MRvCelgot/Z+/Mtw==
=MzTA
-----END PGP SIGNATURE-----

--K44ohHDPLiSqy9xnbALWQdBnfQKSPLthM--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c455aa47-21f9-26d6-629a-94108d8066bf>