public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Weining Lu" <luweining@loongson.cn>
To: "Xi Ruoyao" <xry111@xry111.site>
Cc: "WANG Xuerui" <i.swmail@xen0n.name>,
	binutils@sourceware.org,  "Chenghua Xu" <xuchenghua@loongson.cn>,
	 "Zhensong Liu" <liuzhensong@loongson.cn>,
	 "Qinggang Meng" <mengqinggang@loongson.cn>,
	 "WANG Xuerui" <git@xen0n.name>
Subject: Re: Re: [PATCH] elfedit: add support for editing e_flags
Date: Fri, 3 Mar 2023 09:28:05 +0800 (GMT+08:00)	[thread overview]
Message-ID: <47478557.26dd7.186a5155a76.Coremail.luweining@loongson.cn> (raw)
In-Reply-To: <f12f754b1c3320a6d36291aea0841353e7d8df59.camel@xry111.site>


LLVM mainline doesn't have such an issue. The output is:
$ clang -c t.c -mabi=lp64s -mfpu=64
warning: triple-implied ABI conflicts with provided target-abi 'lp64s', using target-abi
warning: triple-implied ABI conflicts with provided target-abi 'lp64s', using target-abi
$ readelf -h t.o | grep FLOAT
  Flags:                             0x41, SOFT-FLOAT, OBJ-v1
$ clang -c t.c -mabi=lp64s -mfpu=32
warning: triple-implied ABI conflicts with provided target-abi 'lp64s', using target-abi
warning: triple-implied ABI conflicts with provided target-abi 'lp64s', using target-abi
$ readelf -h t.o | grep FLOAT
  Flags:                             0x41, SOFT-FLOAT, OBJ-v1

> -----原始邮件-----
> 发件人: "Xi Ruoyao" <xry111@xry111.site>
> 发送时间:2023-03-02 19:21:43 (星期四)
> 收件人: "WANG Xuerui" <i.swmail@xen0n.name>, binutils@sourceware.org
> 抄送: "Chenghua Xu" <xuchenghua@loongson.cn>, "Zhensong Liu" <liuzhensong@loongson.cn>, "Qinggang Meng" <mengqinggang@loongson.cn>, "WANG
>  Xuerui" <git@xen0n.name>, "Weining Lu" <luweining@loongson.cn>
> 主题: Re: [PATCH] elfedit: add support for editing e_flags
> 
> On Thu, 2023-03-02 at 19:02 +0800, WANG Xuerui wrote:
> > Indeed the object files are correctly LP64S with FP instructions. Won't 
> > have to ask every LoongArch distro to upgrade toolchains any more...
> 
> You may need to fix and/or upgrade Clang if you want to build the DCN
> driver with it.  A Clang "14.0.6" (no idea what it really is, IIRC even
> Clang 15 does not support LoongArch) on gcc400.fsffrance.org (Arch Linux
> installed) produces:
> 
> [xry111@gcc400 ~]$ clang t.c -c -mabi=lp64s -mfpu=64
> [xry111@gcc400 ~]$ readelf -a a.out | grep FLOAT
>   Flags:                             0x43, DOUBLE-FLOAT, OBJ-v1
> 
> And there is some more strange thing:
> 
> [xry111@gcc400 ~]$ clang t.c -c -mabi=lp64s -mfpu=32
> [xry111@gcc400 ~]$ readelf -a a.out | grep FLOAT
>   Flags:                             0x43, DOUBLE-FLOAT, OBJ-v1
> 
> Why would "lp64s" and "fpu=32" lead to double float ?!
> 
> Cc += Weining, though I'm not sure if this issue still exists in LLVM
> mainline.
> 
> -- 
> Xi Ruoyao <xry111@xry111.site>
> School of Aerospace Science and Technology, Xidian University


本邮件及其附件含有龙芯中科的商业秘密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制或散发)本邮件及其附件中的信息。如果您错收本邮件,请您立即电话或邮件通知发件人并删除本邮件。 
This email and its attachments contain confidential information from Loongson Technology , which is intended only for the person or entity whose address is listed above. Any use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction or dissemination) by persons other than the intended recipient(s) is prohibited. If you receive this email in error, please notify the sender by phone or email immediately and delete it. 

  reply	other threads:[~2023-03-03  1:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-02  8:01 WANG Xuerui
2023-03-02  8:20 ` Xi Ruoyao
2023-03-02  8:53   ` WANG Xuerui
2023-03-02  9:04     ` Xi Ruoyao
2023-03-02 10:42       ` Xi Ruoyao
2023-03-02 11:02         ` WANG Xuerui
2023-03-02 11:21           ` Xi Ruoyao
2023-03-03  1:28             ` Weining Lu [this message]
2023-03-02 16:11           ` Xi Ruoyao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47478557.26dd7.186a5155a76.Coremail.luweining@loongson.cn \
    --to=luweining@loongson.cn \
    --cc=binutils@sourceware.org \
    --cc=git@xen0n.name \
    --cc=i.swmail@xen0n.name \
    --cc=liuzhensong@loongson.cn \
    --cc=mengqinggang@loongson.cn \
    --cc=xry111@xry111.site \
    --cc=xuchenghua@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).