patch to eliminate otp/hipe GNU m4 dependency

Mikael Pettersson <>
Tue Oct 16 15:57:17 CEST 2001


Since so many have been trapped by this .. Here's a patch to eliminate
the dependency on GNU m4 when building OTP R8 with --enable-hipe.

I'm CC:ing the patch to erlang-questions in case the OTP folks don't have
time to put this into R8 before the real release.

/Mikael

Index: otp/erts/emulator/Makefile.in
===================================================================
RCS file: /home/harpo/csd/thomasl/hipe/repository/otp/erts/emulator/Makefile.in,v
retrieving revision 1.12
diff -u -r1.12 Makefile.in
--- otp/erts/emulator/Makefile.in	2001/10/10 14:43:12	1.12
+++ otp/erts/emulator/Makefile.in	2001/10/16 12:35:47
@@ -319,7 +319,7 @@
 endif
 
 $(TARGET)/%.S: hipe/%.m4
-	m4 $(INCLUDES) $< > $@
+	m4 -DTARGET=$(TARGET) $< > $@
 
 $(OBJDIR)/%.o: $(TARGET)/%.S
 	$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
Index: otp/erts/emulator/hipe/hipe_sparc_bifs.m4
===================================================================
RCS file: /home/harpo/csd/thomasl/hipe/repository/otp/erts/emulator/hipe/hipe_sparc_bifs.m4,v
retrieving revision 1.10
diff -u -r1.10 hipe_sparc_bifs.m4
--- otp/erts/emulator/hipe/hipe_sparc_bifs.m4	2001/09/17 17:42:29	1.10
+++ otp/erts/emulator/hipe/hipe_sparc_bifs.m4	2001/10/16 12:35:47
@@ -518,11 +518,11 @@
  * BIF_LIST(ModuleAtom,FunctionAtom,Arity,CFun,Index)
  */
 define(BIF_LIST,`standard_bif_interface_$3(nbif_$4, $4)')
-include(`erl_bif_list.h')
+include(TARGET/`erl_bif_list.h')
 
 /*
  * Guard BIFs.
  * GBIF_LIST(FunctionAtom,Arity,CFun)
  */
 define(GBIF_LIST,`guard_bif_interface_$2(gbif_$3, $3)')
-include(`hipe_gbif_list.h')
+include(`hipe/hipe_gbif_list.h')
Index: otp/erts/emulator/hipe/hipe_x86_bifs.m4
===================================================================
RCS file: /home/harpo/csd/thomasl/hipe/repository/otp/erts/emulator/hipe/hipe_x86_bifs.m4,v
retrieving revision 1.15
diff -u -r1.15 hipe_x86_bifs.m4
--- otp/erts/emulator/hipe/hipe_x86_bifs.m4	2001/10/04 16:14:14	1.15
+++ otp/erts/emulator/hipe/hipe_x86_bifs.m4	2001/10/16 12:35:47
@@ -559,11 +559,11 @@
  * BIF_LIST(ModuleAtom,FunctionAtom,Arity,CFun,Index)
  */
 define(BIF_LIST,`standard_bif_interface_$3(nbif_$4, $4)')
-include(`erl_bif_list.h')
+include(TARGET/`erl_bif_list.h')
 
 /*
  * Guard BIFs.
  * GBIF_LIST(FunctionAtom,Arity,CFun)
  */
 define(GBIF_LIST,`nofail_bif_interface_$2(gbif_$3, $3)')
-include(`hipe_gbif_list.h')
+include(`hipe/hipe_gbif_list.h')



More information about the erlang-questions mailing list