public inbox for sid@sourceware.org
 help / color / mirror / Atom feed
* sid cgen cpus broken by absence of pic libiberty
@ 2005-02-02  7:13 Jim Blandy
  2005-02-02  8:41 ` Doug Evans
  2005-02-02 11:18 ` Frank Ch. Eigler
  0 siblings, 2 replies; 3+ messages in thread
From: Jim Blandy @ 2005-02-02  7:13 UTC (permalink / raw)
  To: sid, cgen


I think the SID build is broken for CGEN-based processors.

The libcgencpu.la library, built in sid/component/cgen-cpu, depends on
libiberty.  There are some occasional uses of xmalloc in tracedis.cxx,
but libcgencpu.la also uses files from libopcodes, which use the
"safe-ctype.h" character classification functions.  Fine.

Unfortunately, libiberty no longer builds PIC versions of its .o
files.  It used to, but there was long and highly confusing discussion
about how to fix things in December, which resulted in many large
patches, all of which were eventually reverted.  See the binutils
mailing list.  I can't find the discussion of why H.J. Lu reverted the
hard work he'd done getting libiberty to use libtool, but it sure
looked like a testing nightmare (AIX and an HP-UX x IA64 build were
both brought up as problematic cases).

And if there are no PIC libiberty objects, then libcgencpu.la
certainly can't use libiberty.

Since worthies much worthier than I have struggled with making
libiberty produce PIC object files and failed, I'm inclined to work on
making the opcodes stuff and sid no longer depend on libiberty.  It's
going to involve cringe-inducing patch hunks like this:

*************** cgen_parse_keyword (CGEN_CPU_DESC cd ATT
*** 216,222 ****
    /* Allow letters, digits, and any special characters.  */
    while (((p - start) < (int) sizeof (buf))
  	 && *p
! 	 && (ISALNUM (*p)
  	     || *p == '_'
  	     || strchr (keyword_table->nonalpha_chars, *p)))
      ++p;
--- 216,224 ----
    /* Allow letters, digits, and any special characters.  */
    while (((p - start) < (int) sizeof (buf))
  	 && *p
! 	 && (('a' <= *p && *p <= 'z')
!              || ('A' <= *p && *p <= 'Z')
!              || ('0' <= *p && *p <= '9')
  	     || *p == '_'
  	     || strchr (keyword_table->nonalpha_chars, *p)))
      ++p;

Does that sound reasonable (well, reasonable with a clothespin on the
nose) to folks?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* sid cgen cpus broken by absence of pic libiberty
  2005-02-02  7:13 sid cgen cpus broken by absence of pic libiberty Jim Blandy
@ 2005-02-02  8:41 ` Doug Evans
  2005-02-02 11:18 ` Frank Ch. Eigler
  1 sibling, 0 replies; 3+ messages in thread
From: Doug Evans @ 2005-02-02  8:41 UTC (permalink / raw)
  To: Jim Blandy; +Cc: sid, cgen

Jim Blandy writes:
 > *************** cgen_parse_keyword (CGEN_CPU_DESC cd ATT
 > *** 216,222 ****
 >     /* Allow letters, digits, and any special characters.  */
 >     while (((p - start) < (int) sizeof (buf))
 >   	 && *p
 > ! 	 && (ISALNUM (*p)
 >   	     || *p == '_'
 >   	     || strchr (keyword_table->nonalpha_chars, *p)))
 >       ++p;
 > --- 216,224 ----
 >     /* Allow letters, digits, and any special characters.  */
 >     while (((p - start) < (int) sizeof (buf))
 >   	 && *p
 > ! 	 && (('a' <= *p && *p <= 'z')
 > !              || ('A' <= *p && *p <= 'Z')
 > !              || ('0' <= *p && *p <= '9')
 >   	     || *p == '_'
 >   	     || strchr (keyword_table->nonalpha_chars, *p)))
 >       ++p;
 > 
 > Does that sound reasonable (well, reasonable with a clothespin on the
 > nose) to folks?

Well, I'd still tuck the code away in macro or whatever.
Or, use just plain ctype.  This is just one example so
who knows what libiberty actually brings to the party
in all the affected cases though.

Seems pretty sad though, eh?

Maybe the thing to do is create one's own mini-libiberty
that one controls and so isn't sacked with the politics or
whatever of binutils.  Keeping the naming close to libiberty
would allow an easier transition back to libiberty if such
a day arrives.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: sid cgen cpus broken by absence of pic libiberty
  2005-02-02  7:13 sid cgen cpus broken by absence of pic libiberty Jim Blandy
  2005-02-02  8:41 ` Doug Evans
@ 2005-02-02 11:18 ` Frank Ch. Eigler
  1 sibling, 0 replies; 3+ messages in thread
From: Frank Ch. Eigler @ 2005-02-02 11:18 UTC (permalink / raw)
  To: Jim Blandy; +Cc: sid, cgen

[-- Attachment #1: Type: text/plain, Size: 446 bytes --]

Hi -


> I think the SID build is broken for CGEN-based processors.
> [...]
> Since worthies much worthier than I have struggled with making
> libiberty produce PIC object files and failed, I'm inclined to work on
> making the opcodes stuff and sid no longer depend on libiberty.  [...]

Thanks.  I'd like to "ditto" dje and suggest in this case going to
direct ctype.h.  Let's lose library/macro indirection unless it is
known to help.


- FChE

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-02-02 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-02  7:13 sid cgen cpus broken by absence of pic libiberty Jim Blandy
2005-02-02  8:41 ` Doug Evans
2005-02-02 11:18 ` Frank Ch. Eigler

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).