[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: file magic regex for hppa*64*
From: |
Rainer Emrich |
Subject: |
Re: file magic regex for hppa*64* |
Date: |
Fri, 16 Jan 2009 19:24:49 +0100 |
User-agent: |
Thunderbird 2.0.0.19 (Windows/20081209) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Peter,
Peter Rosin schrieb:
> Den 2009-01-16 16:20 skrev Rainer Emrich:
>> The file magic regex for detecting PA-RISC shared objects only works for
>> native
>> HP-UX file command. This prevents from using a BSD file command and from
>> building a cross compiler from Linux to HP-UX, see
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38384
>>
>> Please, CC me because I'm off list.
>
> If I get this right, this is the suggested patch:
There is an updated version for all HP-UX hosts.
>
> Index: libtool.m4
> ===================================================================
> --- libtool.m4 (revision 143362)
> +++ libtool.m4 (working copy)
> @@ -3051,7 +3051,7 @@ hpux10.20* | hpux11*)
> lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
> ;;
> hppa*64*)
> - [lt_cv_deplibs_check_method='file_magic
> (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
> + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[
> -]{1}[0-9][0-9][bit MSB-]*) shared object[, file-]* PA-RISC [0-9].[0-9]']
> lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
> ;;
> *)
> Index: libjava/libltdl/acinclude.m4
> *snip*
> acinclude.m4 is generated, at least it is not in the libtool repo...
That's possible.
>
> The new regexp is written to match both:
>
> libm.2: ELF-64 shared object file - PA-RISC 2.0 (LP64)
>
> and
>
> libm.2: ELF 64-bit MSB shared object, PA-RISC 2.0 (LP64) version 1, not
> stripped
>
>
> But then I'm wondering what the "{1}" is doing there? Can't it be zapped?
> And the sets "[bit MSB-]" and "[, file-]" seem a bit suspect, couldn't
> that be better written as "(-bit MSB)?" and "(,| file -)" instead?
>
> I also suggest adding a backslash for the . in the PA-RISC version (the
> backslash is also needed on the * case on the line just after the context).
>
> How about this:
>
> Index: libtool.m4
> ===================================================================
> --- libtool.m4 (revision 143362)
> +++ libtool.m4 (working copy)
> @@ -3051,7 +3051,7 @@ hpux10.20* | hpux11*)
> lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
> ;;
> hppa*64*)
> - [lt_cv_deplibs_check_method='file_magic
> (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
> + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[
> -][0-9][0-9](-bit MSB)?) shared object(,| file -) PA-RISC [0-9]\.[0-9]']
> lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
> ;;
> *)
That's fine with me, I'm not a regex expert. A similiar approach should be good
for the IA64 part.
>
> (However, the regexp matches a bunch of future (and past) PA-RISC
> versions to something named ...pa20_64..., that also seems suspect. I
> would consider changing "PA-RISC [0-9]\.[0-9]" into "PA-RISC 2\.0" if I
> knew anything about the involved systems. Same goes for the "[0-9][0-9]"
> part after ELF, shouldn't that be hard coded to "64" given the name
> ...pa20_64...? But what do I know, perhaps better left as is...)
You're right, there is room for some enhancement, but you never know.
>
> Untested, sorry...
>
> Cheers,
> Peter
>
- --
Mit freundlichen Grüßen / Best Regards
Dipl.-Ing. Rainer Emrich
Dept. Manager IT
TECOSIM Venture GmbH
Ferdinand-Stuttmann-Straße 15
D-65428 Rüsselsheim
Phone +49 (0) 6142 8272-330
Fax +49 (0) 6142 8272-249
Mobile +49 (0) 163 5694920
www.tecosim.com
best partner for simulation
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
TECOSIM Venture GmbH, Rüsselsheim
Firmensitz: Ferdinand-Stuttmann-Straße 15, 65428 Rüsselsheim
Registergericht: Amtsgericht Darmstadt, HRB 83704
Geschäftsführer: Udo Jankowski, Jürgen Veith
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFJcNDw3s6elE6CYeURAh+oAKDgaO4iKwi/VOGiIygjssDQ3RC/JgCeI71M
HZd3rK2bMVI3jQXZqnkXF+Y=
=g7Y5
-----END PGP SIGNATURE-----