From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-2.6 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 8C4401F5AE for ; Thu, 29 Apr 2021 08:54:22 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 044FE120EBC; Thu, 29 Apr 2021 17:53:19 +0900 (JST) Received: from xtrwkhkc.outbound-mail.sendgrid.net (unknown [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id 6BAA0120EB9 for ; Thu, 29 Apr 2021 17:53:16 +0900 (JST) Received: by filterdrecv-5d58f8bcff-gpfzd with SMTP id filterdrecv-5d58f8bcff-gpfzd-1-608A742F-5 2021-04-29 08:54:07.131477643 +0000 UTC m=+41862.756262966 Received: from herokuapp.com (unknown) by geopod-ismtpd-5-2 (SG) with ESMTP id Oj3symo9TxG2TAbLIXGATQ for ; Thu, 29 Apr 2021 08:54:06.947 +0000 (UTC) Date: Thu, 29 Apr 2021 08:54:07 +0000 (UTC) From: nagachika00@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 17787 X-Redmine-Issue-Author: lamont X-Redmine-Sender: nagachika X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 79700 X-SG-EID: =?us-ascii?Q?O2wxg26uOO6cft6GjkEp=2FGevTnH9lR=2FEdG60AX3F8=2FCbvnxrW6M7OnL0yOSXoT?= =?us-ascii?Q?lmdkzUxuTW3erE8KsX+ypAkjMyNA3yL1plA=2Fysy?= =?us-ascii?Q?9c3BwPuf1TxYPIA=2FJ8CqeRpEYZ+g1FXB0WK9xWA?= =?us-ascii?Q?jWWE=2Fp2WZ7ssZWvuiEiih3GasUH4jVsOxDV0GqG?= =?us-ascii?Q?3nGwBvigr4Ve58u0xx4=2FI4vrtaYH39F0BMA=3D=3D?= To: ruby-core@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-core X-Mail-Count: 103653 Subject: [ruby-core:103653] [Ruby master Bug#17787] Four AIX build issues with xlc compiler and ruby-3.0.1 X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #17787 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 2.6: REQUIRED, 2.7: REQUIRED, 3.0: REQUIRED to 2.6: REQUIRED, 2.7: REQUIRED, 3.0: DONE ruby_3_0 3e07a4edc92f18dec4806961c1b724ac5cf4d6b2 merged revision(s) 3a3033c138c0951ad5edbf02b5c233b58a190d2f. ---------------------------------------- Bug #17787: Four AIX build issues with xlc compiler and ruby-3.0.1 https://bugs.ruby-lang.org/issues/17787#change-91749 * Author: lamont (Lamont Granquist) * Status: Closed * Priority: Normal * ruby -v: ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [powerpc-aix7.1.5.0] * Backport: 2.6: REQUIRED, 2.7: REQUIRED, 3.0: DONE ---------------------------------------- Yesterday found 4 small issues trying to use xlc to build ruby 3.0 on AIX that prevented building. My solutions are ugly fixes just to get our own builds going which will not be acceptable, but I'll include links to them. #1: internal/bits.h uses the gcc extension `__builtin_unreachable()` directly, this does not exist on xlc, I think it should be replaced by "`UNREACHABLE`" but I just used an empty statement: https://github.com/chef/omnibus-software/blob/3120a25111a29503a10866cbd4ee9fedcb438cee/config/patches/ruby/ruby-3.0.1-aix-builtin-unreachable.patch the ./configure script is correctly finding `rb_cv_func___builtin_unreachable=no` #2: With xlc to get cpp output you must use '`>`' and not '`-o`' which differs from `COUTFLAG` and this line in Makefile.in is incorrect and really needs better detection of this feature and not just assuming `CPPOUTFLAG = COUTFLAG`. I simply hardcoded the right value of `CPPOUTFLAG`: https://github.com/chef/omnibus-software/blob/3120a25111a29503a10866cbd4ee9fedcb438cee/config/patches/ruby/ruby-3.0.1-aix-cppoutflag.patch #3: The xlc compiler actually supports gcc's sync builtins. See the docs here: https://www.ibm.com/docs/en/SSGH3R_16.1.0/com.ibm.compilers.aix.doc/compiler.pdf#BIFS_GCC_ATOMIC The checks for this in the configure.ac script are guarded by a check for intel architecture which would need to be properly expanded properly in some way so that those checks would run on aix+xlc as well. I just forced it on: https://github.com/chef/omnibus-software/blob/3120a25111a29503a10866cbd4ee9fedcb438cee/config/patches/ruby/ruby-3.0.1-aix-force-gcc-sync-builtins.patch #4: The configure script incorrectly identifies the compiler as supporting `-fdeclspec`. It might be good to just omit these checks on the xlc compiler. I also tested the patches to `fdeclspec` which are currently unreleased in master since we needed to backport those to 3.0.1 for M1 mac builds. This one I just removed the `fdeclspec` checks entirely: https://github.com/chef/omnibus-software/blob/3120a25111a29503a10866cbd4ee9fedcb438cee/config/patches/ruby/ruby-3.0.1-aix-nofdeclspec.patch -- https://bugs.ruby-lang.org/