summaryrefslogtreecommitdiff
path: root/config_h.SH
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-06-15 00:15:52 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-15 00:15:52 +0000
commit5440bc8ef38c925fa824ae72b6c7ad2f21cbda6e (patch)
tree33768a0c14b79a902fd43151b9ff12ca93f62233 /config_h.SH
parentd31cdfb6c818e318a1eec541457f7fecc9be0d36 (diff)
downloadperl-5440bc8ef38c925fa824ae72b6c7ad2f21cbda6e.tar.gz
The first steps towards cross-compilation.
Abstract execution of compiled test executables with $run, and abstract transfer of files with $to and $from. Under cross-compilation the $run, $to, and $from will point to appropriate wrapper scripts, by default ssh and scp, but also rsh, rcp, and cp are supported. If not cross-compiling, they will be set to '', ':', and ':', respectively. With these patches I was able to get Configure for iPAQ ARM Linux on an Intel Linux about 95% right (only a few tests failed to execute or they produced incorrect results), and I was able to compile a functional miniperl. The symbol crosscompile renamed to be usecrosscompile, the corresponding C symbol from CROSSCOMPILE to USE_CROSS_COMPILE. p4raw-id: //depot/perl@10592
Diffstat (limited to 'config_h.SH')
-rw-r--r--config_h.SH84
1 files changed, 45 insertions, 39 deletions
diff --git a/config_h.SH b/config_h.SH
index 8ba725d916..35bfb1b1b7 100644
--- a/config_h.SH
+++ b/config_h.SH
@@ -145,26 +145,6 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
*/
#$d_dlerror HAS_DLERROR /**/
-/* SETUID_SCRIPTS_ARE_SECURE_NOW:
- * This symbol, if defined, indicates that the bug that prevents
- * setuid scripts from being secure is not present in this kernel.
- */
-/* DOSUID:
- * This symbol, if defined, indicates that the C program should
- * check the script that it is executing for setuid/setgid bits, and
- * attempt to emulate setuid/setgid on systems that have disabled
- * setuid #! scripts because the kernel can't do it securely.
- * It is up to the package designer to make sure that this emulation
- * is done securely. Among other things, it should do an fstat on
- * the script it just opened to make sure it really is a setuid/setgid
- * script, it should make sure the arguments passed correspond exactly
- * to the argument on the #! line, and it should not trust any
- * subprocesses to which it must pass the filename rather than the
- * file descriptor of the script to be executed.
- */
-#$d_suidsafe SETUID_SCRIPTS_ARE_SECURE_NOW /**/
-#$d_dosuid DOSUID /**/
-
/* HAS_DUP2:
* This symbol, if defined, indicates that the dup2 routine is
* available to duplicate file descriptors.
@@ -942,17 +922,6 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
*/
#$i_values I_VALUES /**/
-/* I_STDARG:
- * This symbol, if defined, indicates that <stdarg.h> exists and should
- * be included.
- */
-/* I_VARARGS:
- * This symbol, if defined, indicates to the C program that it should
- * include <varargs.h>.
- */
-#$i_stdarg I_STDARG /**/
-#$i_varargs I_VARARGS /**/
-
/* I_VFORK:
* This symbol, if defined, indicates to the C program that it should
* include vfork.h.
@@ -986,12 +955,6 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
*/
#define SH_PATH "$sh" /**/
-/* CROSSCOMPILE:
- * This symbol, if defined, signifies that we our
- * build process is a cross-compilation.
- */
-#$crosscompile CROSSCOMPILE /**/
-
/* INTSIZE:
* This symbol contains the value of sizeof(int) so that the C
* preprocessor can make decisions based on it.
@@ -1075,7 +1038,7 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
* double, or a long double when applicable. Usual values are 2,
* 4 and 8. The default is eight, for safety.
*/
-#if defined(CROSSCOMPILE) || defined(MULTIARCH)
+#if defined(USE_CROSS_COMPILE) || defined(MULTIARCH)
# define MEM_ALIGNBYTES 8
#else
#define MEM_ALIGNBYTES $alignbytes
@@ -1152,7 +1115,7 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
* so the default case (for NeXT) is big endian to catch them.
* This might matter for NeXT 3.0.
*/
-#if defined(CROSSCOMPILE) || defined(MULTIARCH)
+#if defined(USE_CROSS_COMPILE) || defined(MULTIARCH)
# ifdef __LITTLE_ENDIAN__
# if LONGSIZE == 4
# define BYTEORDER 0x1234
@@ -3370,6 +3333,49 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
#define PERL_XS_APIVERSION "$xs_apiversion"
#define PERL_PM_APIVERSION "$pm_apiversion"
+/* SETUID_SCRIPTS_ARE_SECURE_NOW:
+ * This symbol, if defined, indicates that the bug that prevents
+ * setuid scripts from being secure is not present in this kernel.
+ */
+/* DOSUID:
+ * This symbol, if defined, indicates that the C program should
+ * check the script that it is executing for setuid/setgid bits, and
+ * attempt to emulate setuid/setgid on systems that have disabled
+ * setuid #! scripts because the kernel can't do it securely.
+ * It is up to the package designer to make sure that this emulation
+ * is done securely. Among other things, it should do an fstat on
+ * the script it just opened to make sure it really is a setuid/setgid
+ * script, it should make sure the arguments passed correspond exactly
+ * to the argument on the #! line, and it should not trust any
+ * subprocesses to which it must pass the filename rather than the
+ * file descriptor of the script to be executed.
+ */
+#$d_suidsafe SETUID_SCRIPTS_ARE_SECURE_NOW /**/
+#$d_dosuid DOSUID /**/
+
+/* I_STDARG:
+ * This symbol, if defined, indicates that <stdarg.h> exists and should
+ * be included.
+ */
+/* I_VARARGS:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <varargs.h>.
+ */
+#$i_stdarg I_STDARG /**/
+#$i_varargs I_VARARGS /**/
+
+/* USE_CROSS_COMPILE:
+ * This symbol, if defined, indicates that Perl is being cross-compiled.
+ */
+/* PERL_TARGETARCH:
+ * This symbol, if defined, indicates the target architecture
+ * Perl has been cross-compiled to. Undefined if not a cross-compile.
+ */
+#ifndef USE_CROSS_COMPILE
+#$usecrosscompile USE_CROSS_COMPILE /**/
+#define PERL_TARGETARCH "$targetarch" /**/
+#endif
+
/* HAS_DBMINIT_PROTO:
* This symbol, if defined, indicates that the system provides
* a prototype for the dbminit() function. Otherwise, it is up