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

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