diff mbox

[AARCH64] MULTIARCH_DIRNAME breaks multiarch build

Message ID CACgzC7Cv4=ZYh=fc9xGbabdyYGWfGqET2QAr8q0j7CERkhEv0A@mail.gmail.com
State New
Headers show

Commit Message

Zhenqiang Chen Jan. 10, 2014, 8:23 a.m. UTC
Hi,

MULTIARCH_DIRNAME was removed @r196649 since the dir info had been
combined in MULTILIB_OSDIRNAMES.

But MULTIARCH_DIRNAME was re-added @r201164. With this change, the
final multiarch_dir is combined as
"aarch64-linux-gnu:aarch64-linux-gnu", which is incorrect and leads to
multiarch build fail if the sysroot is in correct multiarch layout.

Any reason to add MULTIARCH_DIRNAME? If it is not necessary, can we
remove it as the patch?

Thanks!
-Zhenqiang

ChangeLog:
2014-01-10  Zhenqiang Chen  <zhenqiang.chen@linaro.org>

    * config/aarch64/t-aarch64-linux (MULTIARCH_DIRNAME): Remove.

 # on the baremetal targets.

Comments

Matthias Klose Jan. 10, 2014, 9:23 a.m. UTC | #1
Am 10.01.2014 09:23, schrieb Zhenqiang Chen:
> Hi,
> 
> MULTIARCH_DIRNAME was removed @r196649 since the dir info had been
> combined in MULTILIB_OSDIRNAMES.
> 
> But MULTIARCH_DIRNAME was re-added @r201164. With this change, the
> final multiarch_dir is combined as
> "aarch64-linux-gnu:aarch64-linux-gnu", which is incorrect and leads to
> multiarch build fail if the sysroot is in correct multiarch layout.
> 
> Any reason to add MULTIARCH_DIRNAME? If it is not necessary, can we
> remove it as the patch?

see the thread "[patch] set MULTIARCH_DIRNAME for multilib architectures" from
June 2013.  I think it is necessary to have the default defined.  Yesterday's
build looks ok for me, looking at default and include paths, so maybe I don't
yet understand the issue.

I think aarch64 is the only architecture which introduces MULTILIB_* macros
without actually building any multilib, just to set the default library name to
lib64. So maybe this has some side effects.

  Matthias
Zhenqiang Chen Jan. 10, 2014, 9:49 a.m. UTC | #2
On 10 January 2014 17:23, Matthias Klose <doko@ubuntu.com> wrote:
> Am 10.01.2014 09:23, schrieb Zhenqiang Chen:
>> Hi,
>>
>> MULTIARCH_DIRNAME was removed @r196649 since the dir info had been
>> combined in MULTILIB_OSDIRNAMES.
>>
>> But MULTIARCH_DIRNAME was re-added @r201164. With this change, the
>> final multiarch_dir is combined as
>> "aarch64-linux-gnu:aarch64-linux-gnu", which is incorrect and leads to
>> multiarch build fail if the sysroot is in correct multiarch layout.
>>
>> Any reason to add MULTIARCH_DIRNAME? If it is not necessary, can we
>> remove it as the patch?
>
> see the thread "[patch] set MULTIARCH_DIRNAME for multilib architectures" from
> June 2013.  I think it is necessary to have the default defined.  Yesterday's
> build looks ok for me, looking at default and include paths, so maybe I don't
> yet understand the issue.

In our build, we configure eglbc with
rtlddir=/lib
libdir=/usr/lib/aarch64-linux-gnu
slibdir=/lib/aarch64-linux-gnu

And we configure gcc with "--disable-multilib --enable-multiarch",
But when building gcc libraries, configure FAIL since it can not find
the C libraries. And I try
./xgcc --print-multiarch
the output is "aarch64-linux-gnu:aarch64-linux-gnu"

Any comments?

Thanks!
-Zhenqiang



> I think aarch64 is the only architecture which introduces MULTILIB_* macros
> without actually building any multilib, just to set the default library name to
> lib64. So maybe this has some side effects.
>
>   Matthias
>
diff mbox

Patch

diff --git a/gcc/config/aarch64/t-aarch64-linux
b/gcc/config/aarch64/t-aarch64-linux
index 147452b..77e33ea 100644
--- a/gcc/config/aarch64/t-aarch64-linux
+++ b/gcc/config/aarch64/t-aarch64-linux
@@ -23,7 +23,6 @@  LIB1ASMFUNCS = _aarch64_sync_cache_range

 AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
 MULTILIB_OSDIRNAMES = .=../lib64$(call
if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
-MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)

 # Disable the multilib for linux-gnu targets for the time being; focus