From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2e.google.com (mail-oa1-x2e.google.com [IPv6:2001:4860:4864:20::2e]) by sourceware.org (Postfix) with ESMTPS id 990BD385702F for ; Thu, 14 Jul 2022 12:11:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 990BD385702F Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-1013ecaf7e0so2100757fac.13 for ; Thu, 14 Jul 2022 05:11:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=zmMbYSvkGk0kL/Xy67r3mrRnY09eY+vZOTrcjR+DtZk=; b=VIOjpaomaHAlagPlgRCpxKW8r3gcAIa6Tm+UmJeZM2bGX7xH9GTAypXUTX9Z0RA0g7 rAkkh27OIelSFFngnEBhE9ufmjWu8/hrQJur5fQIYMlKFOxYpZPsrnsye4MgcI5eLnUA TIEqVDnTZOmQzVyGcFdMkALHHME0W1d29Qxj6IVpV8wlXy5ReffvpPb1WGVQcyGgZUHG zLrxUrYIUEt/HqRJ0dA94+tARRMy8FzihEUjObd/WojeXzjqV61VZ0431qE29JRgMW4h tGRqBk1YDR3yTeNXm5RDe8e+ErxVDtAWbGa+xDLSeQg2cUVayfKS8JJRPyChbEXRtK9i dQ1g== X-Gm-Message-State: AJIora/T/kD9g+pcU1YFHad3YgjyRdDtuFA1w/REV5eEylTehnPL2Cds 1fBSlFdob4xnhYoHyNMj+syx2w== X-Google-Smtp-Source: AGRyM1tG0lFTA/PdEZ9Lz5JdehAmKS3yUCMND2seR5HTvDKBp8a2ofj+QKipd6iWrqREHU+rOYMOUA== X-Received: by 2002:a05:6870:e24c:b0:101:3426:de67 with SMTP id d12-20020a056870e24c00b001013426de67mr6896132oac.268.1657800680929; Thu, 14 Jul 2022 05:11:20 -0700 (PDT) Received: from ?IPV6:2804:431:c7ca:19c3:4427:c171:4fa9:c3d9? ([2804:431:c7ca:19c3:4427:c171:4fa9:c3d9]) by smtp.gmail.com with ESMTPSA id j4-20020a9d1784000000b0061c4a7a37fasm598208otj.41.2022.07.14.05.11.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Jul 2022 05:11:20 -0700 (PDT) Message-ID: Date: Thu, 14 Jul 2022 09:11:17 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.0.2 Subject: Re: [PATCH v6 00/13] GLIBC LoongArch PATCHES Content-Language: en-US To: Xi Ruoyao , libc-alpha@sourceware.org, caiyinyu , Carlos O'Donell Cc: joseph_myers@mentor.com References: <20220708065255.2316410-1-caiyinyu@loongson.cn> <7cbacfadd642bafc42076eb5b7455a0acb7c720f.camel@xry111.site> <23a3fdf115790373979ad819b0d6e8cd3f0d4b69.camel@xry111.site> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <23a3fdf115790373979ad819b0d6e8cd3f0d4b69.camel@xry111.site> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2022 12:11:23 -0000 On 14/07/22 08:33, Xi Ruoyao wrote: > On Wed, 2022-07-13 at 16:55 -0300, Adhemerval Zanella Netto wrote: > >> I finished my review for the port and it looks ok in general, however there >> some pieces that would require a v7: >> >>   1. Add R_LARCH_NONE handling on bootstrap, binutils 2.38 does generated it >>      and from previous discussion it should be considered a missed >>      optimizations instead of a linker error. >> >>   2. Remove the __loongarch_soft_float parts, since there is no support for >>      soft floating-point. >> >>   3. Remove sysdeps/unix/sysv/linux/loongarch/ldconfig.h, this file is not >>      required. >> >>   4. Some minor style issues. >> >>   5. Either remove HAVE_GETTIMEOFDAY_VSYSCALL or add a gettimeofday ifunc >>      optimization. >> >> The only part really prevent port inclusion is 1.  I am also assuming ifunc >> is support (at least you have added support on the Linux ABI part) with >> binutils 2.38.  If not, you will need to remove support until you fix it on >> binutils. >> >> And also, you need to check and report the test results using the expected >> defined release branches, using out-of-tree branches are not acceptable for >> inclusion. > > The series tested with Linux-5.19-rc4, Binutils-2.38, and GCC-12.1. > Some kernel patches used but they are only boot protocols and hardware > drivers, not related to userspace ABI so Glibc should be unaffected. > Some Binutils and GCC patches used but they are all already committed to > upstream. Thanks. > > To work around binutils issues, I added R_LARCH_NONE back to > RTLD_BOOTSTRAP, and disabled IFUNC (by adding > libc_cv_ld_gnu_indirect_function=no into preconfigure). I do not think this is blocker, but if you need to explicit add libc_cv_ld_gnu_indirect_function=no it means your toolchain can potentially generate invalid binaries: $ cat test.c #include static int impl (void) { return 42; } static void * resolver (void) { return impl; } int ifunc (void) __attribute__((ifunc ("resolver"))); int main (int argc, char *argv[]) { printf ("%d\n", (int) ifunc ()); return 0; } $ loongarch64-linux-gnu-hard/bin/loongarch64-glibc-linux-gnu-gcc test.c -o test $ qemu-loongarch64 elf/ld.so --library-path . ./test ./test: error while loading shared libraries: unexpected PLT reloc type 0x0c It would be better if you just disable ifunc support on static linker for now. > > Result: > > XPASS: conform/UNIX98/ndbm.h/linknamespace > XPASS: conform/XOPEN2K/ndbm.h/linknamespace > XPASS: conform/XOPEN2K8/ndbm.h/linknamespace > XPASS: conform/XPG42/ndbm.h/linknamespace > UNSUPPORTED: crypt/cert > UNSUPPORTED: elf/tst-env-setuid > UNSUPPORTED: elf/tst-env-setuid-tunables > XPASS: elf/tst-protected1a > XPASS: elf/tst-protected1b > UNSUPPORTED: elf/tst-valgrind-smoke > UNSUPPORTED: misc/tst-adjtimex > UNSUPPORTED: misc/tst-clock_adjtime > UNSUPPORTED: misc/tst-ntp_adjtime > UNSUPPORTED: misc/tst-pkey > UNSUPPORTED: misc/tst-rseq > UNSUPPORTED: misc/tst-rseq-disable > UNSUPPORTED: nptl/test-cond-printers > UNSUPPORTED: nptl/test-condattr-printers > UNSUPPORTED: nptl/test-mutex-printers > UNSUPPORTED: nptl/test-mutexattr-printers > UNSUPPORTED: nptl/test-rwlock-printers > UNSUPPORTED: nptl/test-rwlockattr-printers > UNSUPPORTED: nptl/tst-pthread-gdb-attach > UNSUPPORTED: nptl/tst-pthread-gdb-attach-static > UNSUPPORTED: nptl/tst-rseq-nptl > UNSUPPORTED: stdlib/tst-secure-getenv > UNSUPPORTED: time/tst-clock_settime > UNSUPPORTED: time/tst-settimeofday > Summary of test results: > 4536 PASS > 22 UNSUPPORTED > 12 XFAIL > 6 XPASS