public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* toplevel configure hits sed program length limit on HP-UX
@ 2009-08-31 19:57 Ralf Wildenhues
  2009-08-31 20:00 ` Paolo Bonzini
  2009-08-31 21:07 ` Jeff Law
  0 siblings, 2 replies; 7+ messages in thread
From: Ralf Wildenhues @ 2009-08-31 19:57 UTC (permalink / raw)
  To: gcc; +Cc: bonzini

While still working to prove Bob wrong on the fixincludes sed issues,
I found out that current toplevel config.status hits the program length
limit of HP-UX 11.11 sed:

$ ./config.status
config.status: creating Makefile
sed: There are too many commands for the s&@abs_builddir@&/home/rwild/gcc/build-hppa2.0w-hp-hpux11.11&;t t function.

This is due to the large number of commands added to $extrasub in
configure.ac (around 80 in this case); the limit is (autoconf.info):

|                                       HP-UX sed has a limit of 99
|     commands (not counting `:' commands) and 48 labels, which can not
|     be circumvented by using more than one script file.  [...]

It seems to be possible for now to work around it by hacking Autoconf's
status.m4 to omit the 't t' commands:

$ diff -C 2 config.status config.status1
*** config.status       Mon Aug 31 18:41:02 2009
--- config.status       Mon Aug 31 18:40:49 2009
***************
*** 1079,1093 ****
  :t
  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
! s|@configure_input@|$ac_sed_conf_input|;t t
! s&@top_builddir@&$ac_top_builddir_sub&;t t
! s&@top_build_prefix@&$ac_top_build_prefix&;t t
! s&@srcdir@&$ac_srcdir&;t t
! s&@abs_srcdir@&$ac_abs_srcdir&;t t
! s&@top_srcdir@&$ac_top_srcdir&;t t
! s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
! s&@builddir@&$ac_builddir&;t t
! s&@abs_builddir@&$ac_abs_builddir&;t t
! s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
! s&@INSTALL@&$ac_INSTALL&;t t
  $ac_datarootdir_hack
  "
--- 1079,1093 ----
  :t
  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
! s|@configure_input@|$ac_sed_conf_input|
! s&@top_builddir@&$ac_top_builddir_sub&
! s&@top_build_prefix@&$ac_top_build_prefix&
! s&@srcdir@&$ac_srcdir&
! s&@abs_srcdir@&$ac_abs_srcdir&
! s&@top_srcdir@&$ac_top_srcdir&
! s&@abs_top_srcdir@&$ac_abs_top_srcdir&
! s&@builddir@&$ac_builddir&
! s&@abs_builddir@&$ac_abs_builddir&
! s&@abs_top_builddir@&$ac_abs_top_builddir&
! s&@INSTALL@&$ac_INSTALL&
  $ac_datarootdir_hack
  "


but in the long run (or short, if you add another couple of directories)
we might have to either
- require a better sed,
- split the script in two inside Autoconf (if $extrasub is nonempty),
- allow for extra sed scripts here.

Should I write a patch for omitting the 't t'?

Cheers,
Ralf

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

end of thread, other threads:[~2009-08-31 20:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-31 19:57 toplevel configure hits sed program length limit on HP-UX Ralf Wildenhues
2009-08-31 20:00 ` Paolo Bonzini
2009-08-31 20:41   ` Ralf Wildenhues
2009-08-31 21:11     ` Paolo Bonzini
2009-08-31 23:05       ` Ralf Wildenhues
2009-08-31 21:07 ` Jeff Law
2009-08-31 21:31   ` Ralf Wildenhues

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