Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.92k stars 549 forks source link

[PATCH: 5.6.0]build tweaks for OS/390 (still a broken port though) #1597

Closed p5pRT closed 20 years ago

p5pRT commented 24 years ago

Migrated from rt.perl.org#2819 (status was 'resolved')

Searchable as RT2819$

p5pRT commented 24 years ago

From pvhp@forte.com

The following patch assists with the build of 5.6.0 on OS/390 and possibly platforms that have a broken cpp. \utf8 brokenness persists with these small changes!\

The sed -e '1d' destroys an important trigraph pragma on OS/390 (was this the "nit from Spider Boardman" in change 5441?) and won't work there. The enclosed change to makedepend.SH fixes things for OS/390\, but while things were broken makedepend switched over to using grep and I noted that the entry for config.h in the makefile looked somehthing like​:

config.h​:"Bletch​: How does this C preprocessor catenate tokens?"

which is a header file that is not ditributed with perl :-). Hence to help any platform that may use the grep method in makedepend I've enclosed a tweak to config_h.SH so that bogus include won't be picked up by makedepend. Suggestions on another way to do the makedepend.SH bit are welcome.

Folks may be interested in the result of an attempt to build on OS/390​: If you tweak utf8.c to avoid the attempt to call_method("SWASHNEW"... you cannot get miniperl to turn configpm into lib/Config.pm\, but `make minitest` does still pass something like 35% of the tests (with oodles of CEE dumps depending on the retval from utf8.c​:Perl_swash_init()).

Regarding resurrection of EBCDIC ports​: Sarathy\, you had mentioned taking a look into iperlsys.h for inspiration regarding local char set \<-> utf8. Does that mean for example that we ought to do our own PerlIO_{getc|putc}\, _{gets|puts}\, etc. with a character translation table into iperlsys.h? Thanks for any suggestions.

Files affected​:

  config_h.SH   makedepend.SH

Inline Patch ```diff diff -ru perl-5.6.0_orig/config_h.SH perl-5.6.0/config_h.SH --- perl-5.6.0_orig/config_h.SH Wed Mar 29 10:48:03 2000 +++ perl-5.6.0/config_h.SH Wed Mar 29 10:47:51 2000 @@ -1212,7 +1212,7 @@ # define STRINGIFY(a) PeRl_StGiFy(a) #endif #if $cpp_stuff != 1 && $cpp_stuff != 42 -#include "Bletch: How does this C preprocessor catenate tokens?" +# include "Bletch: How does this C preprocessor catenate tokens?" #endif /* CPPSTDIN: diff -ru perl-5.6.0_orig/makedepend.SH perl-5.6.0/makedepend.SH --- perl-5.6.0_orig/makedepend.SH Wed Mar 29 10:47:29 2000 +++ perl-5.6.0/makedepend.SH Wed Mar 29 10:47:08 2000 @@ -130,22 +130,37 @@ -e 's|\\$||' \ -e p \ -e '}' ) >UU/$file.c - if [ "$osname" = os390 -a "$file" = perly.c ]; then - $echo '#endif' >>UU/$file.c + if [ "$osname" = os390 ]; then + if [ "$file" = perly.c ]; then + $echo '#endif' >>UU/$file.c + fi + $cppstdin $finc -I. $cppflags $cppminus /d' \ + -e '/^#.*"-"/d' \ + -e 's#\.[0-9][0-9]*\.c#'"$file.c#" \ + -e 's/^[ ]*#[ ]*line/#/' \ + -e '/^# *[0-9][0-9]* *[".\/]/!d' \ + -e 's/^.*"\(.*\)".*$/'$filebase'\$(OBJ_EXT): \1/' \ + -e 's/^# *[0-9][0-9]* \(.*\)$/'$filebase'\$(OBJ_EXT): \1/' \ + -e 's|: \./|: |' \ + -e 's|\.c\.c|.c|' $uwinfix | \ + $uniq | $sort | $uniq >> .deptmp + else + $cppstdin $finc -I. $cppflags $cppminus /d' \ + -e '/^#.*"-"/d' \ + -e 's#\.[0-9][0-9]*\.c#'"$file.c#" \ + -e 's/^[ ]*#[ ]*line/#/' \ + -e '/^# *[0-9][0-9]* *[".\/]/!d' \ + -e 's/^.*"\(.*\)".*$/'$filebase'\$(OBJ_EXT): \1/' \ + -e 's/^# *[0-9][0-9]* \(.*\)$/'$filebase'\$(OBJ_EXT): \1/' \ + -e 's|: \./|: |' \ + -e 's|\.c\.c|.c|' $uwinfix | \ + $uniq | $sort | $uniq >> .deptmp fi - $cppstdin $finc -I. $cppflags $cppminus /d' \ - -e '/^#.*"-"/d' \ - -e 's#\.[0-9][0-9]*\.c#'"$file.c#" \ - -e 's/^[ ]*#[ ]*line/#/' \ - -e '/^# *[0-9][0-9]* *[".\/]/!d' \ - -e 's/^.*"\(.*\)".*$/'$filebase'\$(OBJ_EXT): \1/' \ - -e 's/^# *[0-9][0-9]* \(.*\)$/'$filebase'\$(OBJ_EXT): \1/' \ - -e 's|: \./|: |' \ - -e 's|\.c\.c|.c|' $uwinfix | \ - $uniq | $sort | $uniq >> .deptmp done $sed <$mf >$mf.new -e '1,/^# AUTOMATICALLY/!d' ```

End of Patch.

Peter Prymmer