From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by sourceware.org (Postfix) with ESMTPS id E3D833858418 for ; Sat, 16 Oct 2021 11:48:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E3D833858418 Received: by mail-pg1-x52f.google.com with SMTP id q5so11095273pgr.7 for ; Sat, 16 Oct 2021 04:48:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9D3bR6ZhAyiLS89LsHiIF3sDAboeVeL5PxiL0dg/luQ=; b=SDztRAke4G+GBgiw8piZaHRCU6Za+XHn9z1Wxzavu6muUnSJb9o55FbMaooL5DT1mP ArXIZE2IFg8cy7QaEmzjvfqNNwBB45QxmXcQwRi9l8Ua73PLyd1Ws4YVQ9vg/AvfP82q m/wbmbZnnE0IGs8iKiDu1rGMYT6ZHSclXdP6dNmKhNau9Qg79Ru/6tLodlQ9+1UP0XNe o2e1mAQ3KyCga6Lnyk51vb5+LU24RGsZq93rrThoGeKnI1+ZsWuSa1hpSo5r/r/hhjSs CkeVD/myW5A+3/c5fpf32utQGs4aft87ovXaZJ0CGSS9jl9ogxhacxzXII4dm5LEcFS0 BpJA== X-Gm-Message-State: AOAM533Wpvp8Ua3hFaMfXVR6Dc6MESTfKbaJDYb0DOxhP7RwR+50G6zL xXSKlx4VAETfykH8J8VsP9xLSqivg442k/Jdwlw= X-Google-Smtp-Source: ABdhPJyrelyUYlWeLyNZAjj15vVq6fuHe7bWLEa+kgExCHX1lYVkGNHj7UlTvOfwkUDhZoaCzaAcSHa4hss/tESlkjY= X-Received: by 2002:a63:6116:: with SMTP id v22mr13424443pgb.225.1634384926760; Sat, 16 Oct 2021 04:48:46 -0700 (PDT) MIME-Version: 1.0 References: <20210902155045.2620513-1-hjl.tools@gmail.com> In-Reply-To: From: "H.J. Lu" Date: Sat, 16 Oct 2021 04:48:11 -0700 Message-ID: Subject: Re: [PATCH v2 0/4] libffi: Sync with upstream To: David Edelsohn Cc: Richard Biener , Ian Lance Taylor , GCC Patches , Jeff Law , Jakub Jelinek , DJ Delorie , Xi Ruoyao Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3024.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Oct 2021 11:48:49 -0000 On Fri, Oct 15, 2021 at 5:22 PM David Edelsohn wrote: > > On Fri, Oct 15, 2021 at 8:06 PM H.J. Lu wrote: > > > > On Wed, Oct 13, 2021 at 6:42 AM H.J. Lu wrote: > > > > > > On Wed, Oct 13, 2021 at 6:03 AM Richard Biener > > > wrote: > > > > > > > > On Wed, Oct 13, 2021 at 2:56 PM H.J. Lu wrote: > > > > > > > > > > On Wed, Oct 13, 2021 at 5:45 AM Richard Biener > > > > > wrote: > > > > > > > > > > > > On Thu, Sep 2, 2021 at 5:50 PM H.J. Lu wrote: > > > > > > > > > > > > > > Change in the v2 patch: > > > > > > > > > > > > > > 1. Disable static trampolines by default. > > > > > > > > > > > > > > > > > > > > > GCC maintained a copy of libffi snapshot from 2009 and cherry-picked fixes > > > > > > > from upstream over the last 10+ years. In the meantime, libffi upstream > > > > > > > has been changed significantly with new features, bug fixes and new target > > > > > > > support. Here is a set of patches to sync with libffi 3.4.2 release and > > > > > > > make it easier to sync with libffi upstream: > > > > > > > > > > > > > > 1. Document how to sync with upstream. > > > > > > > 2. Add scripts to help sync with upstream. > > > > > > > 3. Sync with libffi 3.4.2. This patch is quite big. It is availale at > > > > > > > > > > > > > > https://gitlab.com/x86-gcc/gcc/-/commit/15e80c879c571f79a0e57702848a9df5fba5be2f > > > > > > > 4. Integrate libffi build and testsuite with GCC. > > > > > > > > > > > > How did you test this? It looks like libgo is the only consumer of > > > > > > libffi these days. > > > > > > In particular go/libgo seems to be supported on almost all targets besides > > > > > > darwin/windows - did you test cross and canadian configurations? > > > > > > > > > > I only tested it on Linux/i686 and Linux/x86-64. My understanding is that > > > > > the upstream libffi works on Darwin and Windows. > > > > > > > > > > > I applaud the attempt to sync to upsteam but I fear you won't get any "review" > > > > > > of this massive diff. > > > > > > > > > > I believe that it should just work. Our libffi is very much out of date. > > > > > > > > Yes, you can hope. And yes, our libffi is out of date. > > > > > > > > Can you please do the extra step to test one weird architecture, namely > > > > powerpc64-aix which is available on the compile-farm? > > > > > > I will give it a try and report back. > > > > > > > If that goes well I think it's good to "hope" at this point (and plenty of > > > > time to fix fallout until the GCC 12 release). > > > > > > > > Thus OK after the extra testing dance and waiting until early next > > > > week so others can throw in a veto. > > > > I tried to bootstrap GCC master branch on gcc119.fsffrance.org: > > > > * MT/MODEL: 8284-22A * > > * Partition: gcc119 * > > * System: power8-aix.osuosl.org * > > * O/S: AIX V7.2 7200-04-03-2038 > > > > I configured GCC with > > > > --with-as=/usr/bin/as --with-ld=/usr/bin/ld > > --enable-version-specific-runtime-libs --disable-nls > > --enable-decimal-float=dpd --disable-libstdcxx-pch --disable-werror > > --enable-__cxa_atexit --with-gmp=/opt/cfarm --with-mpfr=/opt/cfarm > > --with-mpc=/opt/cfarm --with-isl=/opt/cfarm --prefix=/opt/freeware > > --with-local-prefix=/opt/freeware --enable-languages=c,c++,go > > > > I got > > > > g++ -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W > > -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-at > > tribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno- > > overlength-strings -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -static-libstd > > c++ -static-libgcc -Wl,-bbigtoc -Wl,-bmaxdata:0x40000000 -o build/genenums \ > > build/genenums.o build/read-md.o build/errors.o ../build-powerpc-ibm-aix7.2. > > 4.0/libiberty/libiberty.a > > ld: 0711-317 ERROR: Undefined symbol: lexer_line > > ld: 0711-317 ERROR: Undefined symbol: .yylex(char const**) > > ld: 0711-317 ERROR: Undefined symbol: .yybegin(char const*) > > ld: 0711-317 ERROR: Undefined symbol: lexer_toplevel_done > > ld: 0711-317 ERROR: Undefined symbol: .yyend() > > ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. > > collect2: error: ld returned 8 exit status > > Makefile:3000: recipe for target 'build/gengtype' failed > > gmake[5]: *** [build/gengtype] Error 1 > > > > David, is there an instruction to bootstrap GCC on AIX? > > The CompileFarm page in the GCC wiki has instructions under "build tips": > > https://gcc.gnu.org/wiki/CompileFarm#Services_and_software_installed_on_farm_machines > > The error that you show might be due to not having /opt/freeware/bin > first in your path and the bootstrap used the AIX version of lex or > sed or some other command. > Hi David, I made some progress. I am trying to verify my libffi sync branch: https://gitlab.com/x86-gcc/gcc/-/tree/users/hjl/libffi/master on powerpc64-aix. Go is the only user of libffi. But compiler farm suggestion is .../src/configure --disable-werror --enable-languages=c,c++ --with-gmp=/opt/cfarm --with-libiconv-prefix=/opt/cfarm --disable-libstdcxx-pch --with-included-gettext When I added Go with --enable-languages=c,c++,go, I got /opt/freeware/bin/bash: missing-objcopy: command not found /opt/freeware/bin/bash: missing-objcopy: command not found /opt/freeware/bin/bash /home/hjl/work/git/gitlab/x86-gcc/libgo/mvifdiff.sh build cfg.go.tmp buildcfg.go mv: 0653-401 Cannot rename internal/unsafeheader.s-gox.tmp to internal/unsafehea der.gox: A file or directory in the path name does not exist. mv: 0653-401 Cannot rename runtime/internal/atomic.s-gox.tmp to runtime/internal /atomic.gox: A file or directory in the path name does not exist. mv: 0653-401 Cannot rename internal/race.s-gox.tmp to internal/race.gox: A file or directory in the path name does not exist. Makefile:3019: recipe for target 'runtime/internal/atomic.s-gox' failed gmake[10]: *** [runtime/internal/atomic.s-gox] Error 1 Is Go supported on AIX? If yes, what did I do wrong? -- H.J.