From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS autolearn=no autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=+/JScBJ6HfPj7fJkaOcEH09WLQkKjZhWmRmOpBSIIvc=; b=H+01aJVXVrIS5Hd0PgNBaHRwTs6aOCBxfZCmiCYdgnf1BH+jpNAcoAQzQ/QDFlcIYC MbwzJAbeCU/9PWEOzePC3tBNCp0KG7OD7lAaon6cZVBNHfbuE2DnKSn4ef6vvsllMa7C YKBa+ulCluc3G4Wa0w+JyhBbAQONBUNDJA/3yB8m3qahPzKOcMBYZr9yblX1LgWxLozL +/sOmYOVU7yb62zNkkJHnf2Dvq9T/QM9XAyGVMxRaQXhweHiZ4tUHCaPjOsY/xyAdOXE nRDsvwgN0KO6QHlqe4MZ2p90k+Pa7C94pfhfMrgofz0LX3oMvxaHa0+NU5PgPwtjwtt6 74LQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=+/JScBJ6HfPj7fJkaOcEH09WLQkKjZhWmRmOpBSIIvc=; b=lAQ/l/ikE7tagBAuT9r+10nTaTW7NuOKZBsKxvLwII7Lz7PMH/5Q08hQuGbaYe5d8J e9XZ3RLHdDo8vaonHxLJoWdPxH91yZE11l99lG3hm0FrD/4oXLkxYhdB3sZXqHrPxe3Z 8XQVgZX2nLzcsu3BPYM5LfHwRzfsaECkMV4aIzHf4TpBqEY3Kot7VnTFgeCNdxRpTJ1H i1Hxk745oIQ7VHbmoG8Iy9pN8nGIZNZyo/gCyPYk6LCr9nJoi/rlFT+/l+rTKjs+jtNH c7eldUK1C0x4tXVz8PJBrOvTBlvtX9tQ7SsGooxY/Kwe9htuWf8aExRTEccyUgwxSDTS 3uvQ== X-Gm-Message-State: AOAM530hzP/SE9R7dj4GcUkC1NjNlt6gcqZovJ5wS1+nV6lHH4zhCToh YlF9MW/l39zR2Adq6ggRbHw= X-Google-Smtp-Source: ABdhPJxdJTcjECbNixExQ+5DbaW5E1PweYaa4D1/PeUWMtQ9/K4s1w3tymWXl+jr8pL3G7mIx2gICA== X-Received: by 2002:a2e:a175:: with SMTP id u21mr8956327ljl.7.1600328393020; Thu, 17 Sep 2020 00:39:53 -0700 (PDT) Sender: "Ivan A. Melnikov" Date: Thu, 17 Sep 2020 11:39:50 +0400 From: "Ivan A. Melnikov" To: Motsyo Gennadi aka Drool , sisyphus@lists.altlinux.org Message-ID: <20200917073950.mqfuu4nqti2hskkt@titan.localdomain> Mail-Followup-To: Motsyo Gennadi aka Drool , sisyphus@lists.altlinux.org References: <140c24dd-43c6-4684-dcde-1c2d584126e4@gmail.com> <20200905191235.GA28255@imap.altlinux.org> <743ec612-dbed-8aed-1147-4a9a144c312b@gmail.com> <20200914133252.GF21301@imap.altlinux.org> <1274303769.1767417.1600259057919.JavaMail.zimbra@taf.ru> <20200916130309.rxrijtgukgumjyq7@titan.localdomain> <542f850b-0d5b-124e-6290-7e5688fe07a1@gmail.com> <20200917072641.fhlnn3m72qptmklh@titan.localdomain> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="naya6ue2eja6gzby" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200917072641.fhlnn3m72qptmklh@titan.localdomain> Subject: Re: [sisyphus] =?utf-8?b?W2hvd3RvXSDQv9C10YHQvtGH0L3QuNGG0LAg0LIg0Ls=?= =?utf-8?b?0L7QutCw0LvRjNC90L7QvCBoYXNoZXI=?= X-BeenThere: sisyphus@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Sisyphus discussions List-Id: ALT Linux Sisyphus discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Sep 2020 07:39:56 -0000 Archived-At: List-Archive: List-Post: --naya6ue2eja6gzby Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Thu, Sep 17, 2020 at 11:26:41AM +0400, Ivan A. Melnikov wrote: > On Thu, Sep 17, 2020 at 10:14:42AM +0300, Motsyo Gennadi aka Drool wrote: > > 16.09.20 16:03, Ivan A. Melnikov пишет: > > > -march=native causes the compiler to auto-detect the architecture of the > > > build computer, то есть использовать всё, что компилятор видит > > > в текущем процессоре. > > > > > > Рекомендуется найти и обезвредить обоих. > > > > В CMakeLists.txt используется конструкция > > ARCH_FLAG "-march=${ARCH}" > > Т.е. "native" ему передает сборочница? В предыдущих версиях эта > > конструкция не использовалась, это нововведение. Кстати, разработчик > > отозвался, пытается разобраться, и мне теперь есть что ему подсказать. > > Нет, native это значение по умолчанию для ${ARCH}: > > http://git.altlinux.org/gears/k/karbowanecwallet.git?a=blob;f=karbowanecwallet/CMakeLists.txt;h=ade77f6fec8fd12312e476387c3e27392e5bcc1a#l360 > > Наверное, это можно победить, передав CMake -DARCH=default. А вот > -maes похоже можно только патчем выкосить. > В первом приближении я бы сделал что-нибудь вроде приложенного, чтобы не заморачиваться. Можно просить апстрим сделать опцию не трогать флаги компилятора. -- wbr, iv m. --naya6ue2eja6gzby Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="resprect-my-cflags.patch" diff --git a/cryptonote/CMakeLists.txt b/cryptonote/CMakeLists.txt index f4454df..b76ee9c 100644 --- a/cryptonote/CMakeLists.txt +++ b/cryptonote/CMakeLists.txt @@ -51,12 +51,6 @@ if(ARCH_ID STREQUAL "ppc64le") set(PPC64LE 1) endif() -if(WIN32 OR ARM) - set(OPT_FLAGS_RELEASE "-O2") -else() - set(OPT_FLAGS_RELEASE "-Ofast") -endif() - # BUILD_TAG is used to select the build type to check for a new version if(BUILD_TAG) message(STATUS "Building build tag ${BUILD_TAG}") @@ -65,9 +59,6 @@ else() message(STATUS "Building without build tag") endif() -set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG ${OPT_FLAGS_RELEASE}") -set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG ${OPT_FLAGS_RELEASE}") - list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake") @@ -300,28 +291,6 @@ else() option(NO_AES "Explicitly disable AES support" ${NO_AES}) - if(NOT NO_AES AND NOT ARM AND NOT PPC64LE) - message(STATUS "AES support enabled") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes") - elseif(PPC64LE) - message(STATUS "AES support not available on ppc64le") - elseif(ARM6) - message(STATUS "AES support not available on ARMv6") - elseif(ARM7) - message(STATUS "AES support not available on ARMv7") - elseif(ARM8) - CHECK_CXX_ACCEPTS_FLAG("-march=${ARCH}+crypto" ARCH_PLUS_CRYPTO) - if(ARCH_PLUS_CRYPTO) - message(STATUS "Crypto extensions enabled for ARMv8") - set(ARCH_FLAG "-march=${ARCH}+crypto") - else() - message(STATUS "Crypto extensions unavailable on your ARMv8 device") - endif() - else() - message(STATUS "AES support disabled") - endif() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${ARCH_FLAG} ${PIC_FLAG}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_CPP_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${ARCH_FLAG} ${PIC_FLAG}") diff --git a/karbowanecwallet/CMakeLists.txt b/karbowanecwallet/CMakeLists.txt index ade77f6..de68e3a 100644 --- a/karbowanecwallet/CMakeLists.txt +++ b/karbowanecwallet/CMakeLists.txt @@ -357,119 +357,8 @@ elseif (UNIX) endif() list(REMOVE_ITEM HEADERS ${CMAKE_SOURCE_DIR}/src/gui/macdockiconhandler.h) - set(ARCH native CACHE STRING "CPU to build for: -march value or default to not pass -march at all") - message(STATUS "Building on ${CMAKE_SYSTEM_PROCESSOR} for ${ARCH}") - if ("${ARCH}" STREQUAL "default") - set(ARCH_FLAG "") - elseif(PPC64LE) - set(ARCH_FLAG "-mcpu=${ARCH}") - else() - set(ARCH_FLAG "-march=${ARCH}") - endif() - - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE") - - if (NOT ARM AND NOT PPC64LE) - message(STATUS "AES support enabled") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -maes") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes") - elseif (PPC64LE) - message(STATUS "AES support not available on ppc64le") - elseif (ARM6) - message(STATUS "AES support not available on ARMv6") - elseif (ARM7) - message(STATUS "AES support not available on ARMv7") - elseif (ARM8) - CHECK_CXX_ACCEPTS_FLAG("-march=${ARCH}+crypto" ARCH_PLUS_CRYPTO) - if (ARCH_PLUS_CRYPTO) - message(STATUS "Crypto extensions enabled for ARMv8") - set(ARCH_FLAG "-march=${ARCH}+crypto") - else() - message(STATUS "Crypto extensions unavailable on your ARMv8 device") - endif() - else() - message(STATUS "AES support disabled") - endif() - - # Compiled binary malfunctions due to aliasing (GCC 6.1+) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-strict-aliasing") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") - - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARCH_FLAG}") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARCH_FLAG}") - - if (ARM) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2") - endif() - - if (ARM) - message(STATUS "Setting FPU Flags for ARM Processors") - # NB NEON hardware does not fully implement the IEEE 754 standard for floating-point arithmetic - # Need custom assembly code to take full advantage of NEON SIMD - # - # Cortex-A5/9 -mfpu=neon-fp16 - # Cortex-A7/15 -mfpu=neon-vfpv4 - # Cortex-A8 -mfpu=neon - # ARMv8 -FP and SIMD on by default for all ARM8v-A series, NO -mfpu setting needed - # - # For custom -mtune, processor IDs for ARMv8-A series: - # 0xd04 - Cortex-A35 - # 0xd07 - Cortex-A57 - # 0xd08 - Cortex-A72 - # 0xd03 - Cortex-A73 - if (NOT ARM8) - CHECK_CXX_ACCEPTS_FLAG(-mfpu=vfp3-d16 CXX_ACCEPTS_VFP3_D16) - CHECK_CXX_ACCEPTS_FLAG(-mfpu=vfp4 CXX_ACCEPTS_VFP4) - CHECK_CXX_ACCEPTS_FLAG(-mfloat-abi=hard CXX_ACCEPTS_MFLOAT_HARD) - CHECK_CXX_ACCEPTS_FLAG(-mfloat-abi=softfp CXX_ACCEPTS_MFLOAT_SOFTFP) - endif() - if (ARM8) - CHECK_CXX_ACCEPTS_FLAG(-mfix-cortex-a53-835769 CXX_ACCEPTS_MFIX_CORTEX_A53_835769) - CHECK_CXX_ACCEPTS_FLAG(-mfix-cortex-a53-843419 CXX_ACCEPTS_MFIX_CORTEX_A53_843419) - endif() - if (ARM6) - message(STATUS "Selecting VFP for ARMv6") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=vfp") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=vfp") - endif() - if (ARM7) - if (CXX_ACCEPTS_VFP3_D16 AND NOT CXX_ACCEPTS_VFP4) - message(STATUS "Selecting VFP3 for ARMv7") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=vfp3-d16") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=vfp3-d16") - endif() - if (CXX_ACCEPTS_VFP4) - message(STATUS "Selecting VFP4 for ARMv7") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=vfp4") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=vfp4") - endif() - if (CXX_ACCEPTS_MFLOAT_HARD) - message(STATUS "Setting Hardware ABI for Floating Point") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfloat-abi=hard") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfloat-abi=hard") - endif() - if (CXX_ACCEPTS_MFLOAT_SOFTFP AND NOT CXX_ACCEPTS_MFLOAT_HARD) - message(STATUS "Setting Software ABI for Floating Point") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfloat-abi=softfp") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfloat-abi=softfp") - endif() - endif() - if (ARM8) - if (CXX_ACCEPTS_MFIX_CORTEX_A53_835769) - message(STATUS "Enabling Cortex-A53 workaround 835769") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfix-cortex-a53-835769") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfix-cortex-a53-835769") - endif() - if (CXX_ACCEPTS_MFIX_CORTEX_A53_843419) - message(STATUS "Enabling Cortex-A53 workaround 843419") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfix-cortex-a53-843419") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfix-cortex-a53-843419") - endif() - endif() - endif() - + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE -fno-strict-aliasing") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE -fno-strict-aliasing") endif() endif () --naya6ue2eja6gzby--