From patchwork Thu May 14 18:03:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 48535 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 42EE02121F for ; Thu, 14 May 2015 18:03:52 +0000 (UTC) Received: by wgin8 with SMTP id n8sf21816194wgi.0 for ; Thu, 14 May 2015 11:03:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mailing-list:precedence:list-id :list-unsubscribe:list-subscribe:list-archive:list-post:list-help :sender:delivered-to:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding:x-original-sender :x-original-authentication-results; bh=apVRwYNOeeeVC8A+itlQxLVlL6FFht9syQ0MLojLoEA=; b=ASHwOJ4C5qhf2LnKGyZ3t2XYEqOh5GCr/zZmis//EBDk29E/F9SwT/2/uSffk60Et7 aqmp0azvcfQf+3H3IJWwrMEbnk0TGPXHYjcxdjoe4/fTql6nD5NQgN7Vc8Sttln33cJ7 U7wuFHYfgKI+odf6++xwTBVf+P5Aw+q9OM5zhqPqFfY6infevgeEKGD4WvZFo3RubYdd JMxJrmE653xyvaVAzqBB/vtRlWHexV0WAkbJiJ5N40YpiiSGoYlDPDruDAqNhiRyKsft 7WPCe6jTjHP3DEsrTNA1ZYohF3d9XAKOiWHmwfKibdbeMG4uUYlAz/YyMRNLQyG4TMwF ercA== X-Gm-Message-State: ALoCoQlxQMDmiatgxNCMQJVi466wc5JDrnVloDrrLtadT0bBhQLxitUOb7J8ben775g9Wfcprm+a X-Received: by 10.180.98.130 with SMTP id ei2mr9986899wib.0.1431626631586; Thu, 14 May 2015 11:03:51 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.116.74 with SMTP id ju10ls445562lab.23.gmail; Thu, 14 May 2015 11:03:51 -0700 (PDT) X-Received: by 10.112.168.72 with SMTP id zu8mr4183834lbb.54.1431626631417; Thu, 14 May 2015 11:03:51 -0700 (PDT) Received: from mail-la0-x230.google.com (mail-la0-x230.google.com. [2a00:1450:4010:c03::230]) by mx.google.com with ESMTPS id p5si15025997lah.22.2015.05.14.11.03.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 May 2015 11:03:51 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::230 as permitted sender) client-ip=2a00:1450:4010:c03::230; Received: by layy10 with SMTP id y10so79080292lay.0 for ; Thu, 14 May 2015 11:03:51 -0700 (PDT) X-Received: by 10.152.4.137 with SMTP id k9mr4041508lak.29.1431626631250; Thu, 14 May 2015 11:03:51 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1437528lbb; Thu, 14 May 2015 11:03:49 -0700 (PDT) X-Received: by 10.66.117.233 with SMTP id kh9mr10481300pab.103.1431626629208; Thu, 14 May 2015 11:03:49 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id hm2si33555306pdb.83.2015.05.14.11.03.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 May 2015 11:03:49 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-58897-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 38429 invoked by alias); 14 May 2015 18:03:35 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list List-Id: List-Unsubscribe: , List-Subscribe: List-Archive: List-Post: , List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 38415 invoked by uid 89); 14 May 2015 18:03:35 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qk0-f171.google.com X-Received: by 10.140.95.208 with SMTP id i74mr6973770qge.51.1431626610097; Thu, 14 May 2015 11:03:30 -0700 (PDT) Message-ID: <5554E36E.3000801@linaro.org> Date: Thu, 14 May 2015 15:03:26 -0300 From: Adhemerval Zanella User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: "H.J. Lu" CC: GNU C Library Subject: Re: [committed, PATCH] BZ #18409: Remove a trailing `\' in make-syscalls.sh References: <5553A664.8090904@linaro.org> In-Reply-To: X-Original-Sender: adhemerval.zanella@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::230 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 On 13-05-2015 16:34, H.J. Lu wrote: > On Wed, May 13, 2015 at 12:30 PM, Adhemerval Zanella > wrote: >> Hi >> >> On 13-05-2015 13:20, H.J. Lu wrote: >>> commit c14874927b499ddfdbb03745bb32bfc778b8595f >>> Author: Roland McGrath >>> Date: Tue May 22 16:00:50 2012 -0700 >>> >>> syscalls.list support for vDSO IFUNCs, use it for x32 gettimeofday and time. >>> >>> added >>> >>> \$(foreach p,\$(sysd-rules-targets),\$(objpfx)\$(patsubst %,\$p,$file).os): \\ >>> \$(..)sysdeps/unix/make-syscalls.sh\ >>> \$(make-target-directory) >>> >>> to sysdeps/unix/make-syscalls.sh which generates >>> >>> #### CALL=gettimeofday NUMBER=(0x40000000 + 96) ARGS=i:pP SOURCE=- >>> ifeq (,$(filter gettimeofday,$(unix-syscalls))) >>> unix-syscalls += gettimeofday >>> $(foreach p,$(sysd-rules-targets),$(foreach >>> o,$(object-suffixes-noshared),$(objpfx)$(patsubst >>> %,$p,gettimeofday)$o)): \ >>> $(..)sysdeps/unix/make-syscalls.sh >>> $(make-target-directory) >>> (echo '#define SYSCALL_NAME gettimeofday'; \ >>> echo '#define SYSCALL_NARGS 2'; \ >>> echo '#define SYSCALL_SYMBOL __gettimeofday'; \ >>> echo '#include '; \ >>> echo 'weak_alias (__gettimeofday, gettimeofday)'; \ >>> echo 'libc_hidden_weak (gettimeofday)'; \ >>> ) | $(compile-syscall) $(foreach p,$(patsubst >>> %gettimeofday,%,$(basename $(@F))),$($(p)CPPFLAGS)) >>> $(foreach p,$(sysd-rules-targets),$(objpfx)$(patsubst %,$p,gettimeofday).os): \ >>> $(..)sysdeps/unix/make-syscalls.sh $(make-target-directory) >>> ^^^^^^^^^ Missing newline >>> (echo '#include '; \ >>> echo 'extern void *__gettimeofday_ifunc (void) __asm >>> ("__gettimeofday");'; \ >>> echo 'void *'; \ >>> echo '__gettimeofday_ifunc (void)'; \ >>> echo '{'; \ >>> echo ' PREPARE_VERSION_KNOWN (symver, LINUX_2_6);'; \ >>> echo ' return _dl_vdso_vsym ("__vdso_gettimeofday", &symver);'; \ >>> echo '}'; \ >>> echo 'asm (".type __gettimeofday, %gnu_indirect_function");'; \ >>> echo 'asm (".globl __GI___gettimeofday\n"'; \ >>> echo ' "__GI___gettimeofday = __gettimeofday");'; \ >>> echo 'weak_alias (__gettimeofday, gettimeofday)'; \ >>> echo 'libc_hidden_weak (gettimeofday)'; \ >>> ) | $(compile-stdin.c) $(foreach p,$(patsubst >>> %gettimeofday,%,$(basename $(@F))),$($(p)CPPFLAGS)) >>> endif >>> >>> This only affected x32. I checked in this patch after tested on >>> x32. >>> >>> Adhemerval, can you check if your problem with dash in >>> >>> https://sourceware.org/ml/libc-alpha/2015-04/msg00277.html >>> >>> is fixed by this? >>> >>> Thanks. >> >> I have been testing another more complete fix pointed out by Joseph [1] >> and it fixes the x32 build with dash issue I was seeing. Shouldn't we >> push this one? >> >> [1] https://sourceware.org/ml/libc-alpha/2015-02/msg00396.html > > Well, this part is the same as the one I checked in: > > \$(foreach p,\$(sysd-rules-targets),\$(objpfx)\$(patsubst %,\$p,$file).os): \\ > - \$(..)sysdeps/unix/make-syscalls.sh\ > + \$(..)sysdeps/unix/make-syscalls.sh > > At minimum, that patch should be rebased. > What about: I checked builds for x86_64, i386, x32, and aarch64 for both dash and bash. diff --git a/sysdeps/unix/make-syscalls.sh b/sysdeps/unix/make-syscalls.sh index 910a22c..12f664e 100644 --- a/sysdeps/unix/make-syscalls.sh +++ b/sysdeps/unix/make-syscalls.sh @@ -272,28 +272,33 @@ while read file srcfile caller syscall args strong weak; do vdso_symbol="${vdso_syscall%@*}" vdso_symver="${vdso_syscall#*@}" vdso_symver=`echo "$vdso_symver" | sed 's/\./_/g'` - echo "\ + cat <'; \\ - echo 'extern void *${strong}_ifunc (void) __asm (\"${strong}\");'; \\ + echo 'extern void *${strong}_ifunc (void) __asm ("${strong}");'; \\ echo 'void *'; \\ echo '${strong}_ifunc (void)'; \\ echo '{'; \\ echo ' PREPARE_VERSION_KNOWN (symver, ${vdso_symver});'; \\ - echo ' return _dl_vdso_vsym (\"${vdso_symbol}\", &symver);'; \\ + echo ' return _dl_vdso_vsym ("${vdso_symbol}", &symver);'; \\ echo '}'; \\ - echo 'asm (\".type ${strong}, %gnu_indirect_function\");'; \\" + echo 'asm (".type ${strong}, %gnu_indirect_function");'; \\ +EOF # This is doing "libc_hidden_def (${strong})", but the compiler # doesn't know that we've defined ${strong} in the same file, so # we can't do it the normal way. - echo "\ - echo 'asm (\".globl __GI_${strong}\\n\"'; \\ - echo ' \"__GI_${strong} = ${strong}\");'; \\" + cat <