public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: WANG Xuerui <i.swmail@xen0n.name>, binutils@sourceware.org
Cc: 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>
Subject: Re: [PATCH] elfedit: add support for editing e_flags
Date: Thu, 02 Mar 2023 19:21:43 +0800	[thread overview]
Message-ID: <f12f754b1c3320a6d36291aea0841353e7d8df59.camel@xry111.site> (raw)
In-Reply-To: <e0ee7409-073a-734c-55fa-315c80b44845@xen0n.name>

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

  reply	other threads:[~2023-03-02 11:21 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 [this message]
2023-03-03  1:28             ` Weining Lu
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=f12f754b1c3320a6d36291aea0841353e7d8df59.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=binutils@sourceware.org \
    --cc=git@xen0n.name \
    --cc=i.swmail@xen0n.name \
    --cc=liuzhensong@loongson.cn \
    --cc=luweining@loongson.cn \
    --cc=mengqinggang@loongson.cn \
    --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).