configure.com 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. $!
  2. $! This file configures binutils for use with openVMS/Alpha
  3. $! We do not use the configure script, since we do not have /bin/sh
  4. $! to execute it.
  5. $!
  6. $! Copyright (C) 2012-2022 Free Software Foundation, Inc.
  7. $!
  8. $! This file is free software; you can redistribute it and/or modify
  9. $! it under the terms of the GNU General Public License as published by
  10. $! the Free Software Foundation; either version 3 of the License, or
  11. $! (at your option) any later version.
  12. $!
  13. $! This program is distributed in the hope that it will be useful,
  14. $! but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. $! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. $! GNU General Public License for more details.
  17. $!
  18. $! You should have received a copy of the GNU General Public License
  19. $! along with this program; see the file COPYING3. If not see
  20. $! <http://www.gnu.org/licenses/>.
  21. $!
  22. $! Written by Klaus K"ampf (kkaempf@rmi.de)
  23. $!
  24. $ arch=F$GETSYI("ARCH_NAME")
  25. $ arch=F$EDIT(arch,"LOWERCASE")
  26. $ write sys$output "Configuring binutils for ''arch' target"
  27. $!
  28. $! Generate config.h
  29. $!
  30. $ create config.h
  31. /* config.h. Generated automatically by configure.com */
  32. /* Is the type time_t defined in <time.h>? */
  33. #define HAVE_TIME_T_IN_TIME_H 1
  34. /* Is the type time_t defined in <sys/types.h>? */
  35. #define HAVE_TIME_T_IN_TYPES_H 1
  36. /* Does <utime.h> define struct utimbuf? */
  37. #define HAVE_GOOD_UTIME_H 1
  38. /* Whether fprintf must be declared even if <stdio.h> is included. */
  39. #define NEED_DECLARATION_FPRINTF 1
  40. /* Do we need to use the b modifier when opening binary files? */
  41. /* #undef USE_BINARY_FOPEN */
  42. /* Define if you have the utimes function. */
  43. #define HAVE_UTIMES 1
  44. /* Define if you have the <fcntl.h> header file. */
  45. #define HAVE_FCNTL_H 1
  46. /* Define if you have the <stdlib.h> header file. */
  47. #define HAVE_STDLIB_H 1
  48. /* Define if you have the <string.h> header file. */
  49. #define HAVE_STRING_H 1
  50. /* Define if you have the <strings.h> header file. */
  51. #define HAVE_STRINGS_H 1
  52. /* Define if you have the <sys/file.h> header file. */
  53. #define HAVE_SYS_FILE_H 1
  54. /* Define if you have the <unistd.h> header file. */
  55. #define HAVE_UNISTD_H 1
  56. /* Alloca. */
  57. #ifdef __DECC
  58. #include <builtins.h>
  59. #define C_alloca(x) __ALLOCA(x)
  60. #endif
  61. /* Name of package */
  62. #define PACKAGE "binutils"
  63. /* Define to the address where bug reports for this package should be sent. */
  64. #define PACKAGE_BUGREPORT ""
  65. /* Define to the full name of this package. */
  66. #define PACKAGE_NAME ""
  67. /* Define to the full name and version of this package. */
  68. #define PACKAGE_STRING ""
  69. /* Define to the one symbol short name of this package. */
  70. #define PACKAGE_TARNAME ""
  71. /* Define to the home page for this package. */
  72. #define PACKAGE_URL ""
  73. /* Define to the version of this package. */
  74. #define PACKAGE_VERSION ""
  75. $!
  76. $! Add TARGET.
  77. $!
  78. $ if arch .eqs. "ia64" then target = "elf64-ia64-vms"
  79. $ if arch .eqs. "alpha" then target = "vms-alpha"
  80. $ if arch .eqs. "vax" then target = "vms-vax"
  81. $!
  82. $ open/append tfile config.h
  83. $ write tfile "#define TARGET """ + target + """"
  84. $ close tfile
  85. $ write sys$output "Created `config.h'"
  86. $!
  87. $ write sys$output "Generate binutils build.com"
  88. $!
  89. $ create build.com
  90. $DECK
  91. $ DEFS=""
  92. $ OPT="/noopt/debug"
  93. $ CFLAGS=OPT + "/include=([],""../include"",[-.bfd])" +-
  94. "/name=(as_is,shortened)" +-
  95. "/prefix=(all,exc=(""getopt"",""optarg"",""optopt"",""optind"",""opterr""))"
  96. $ BFDLIB = ",[-.bfd]libbfd.olb/lib"
  97. $ LIBIBERTY = ",[-.libiberty]libiberty.olb/lib"
  98. $ OPCODES = ",[-.opcodes]libopcodes.olb/lib"
  99. $ DEBUG_FILES = ",rddbg,debug,stabs,ieee,rdcoff,dwarf"
  100. $ BULIBS_FILES = ",bucomm,version,filemode"
  101. $ ALL_FILES="nm,strings,addr2line,size,objdump,prdbg" +-
  102. BULIBS_FILES + DEBUG_FILES
  103. $!
  104. $ write sys$output "CFLAGS=",CFLAGS
  105. $ if p1.nes."LINK"
  106. $ then
  107. $ NUM = 0
  108. $ LOOP:
  109. $ F = F$ELEMENT(NUM,",",ALL_FILES)
  110. $ IF F.EQS."," THEN GOTO END
  111. $ write sys$output "Compiling ", F, ".c"
  112. $ cc 'CFLAGS 'F.c
  113. $ NUM = NUM + 1
  114. $ GOTO LOOP
  115. $ END:
  116. $ endif
  117. $ purge
  118. $!
  119. $ write sys$output "Building nm.exe"
  120. $ NM_OBJS="nm.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
  121. $ link/exe=nm 'NM_OBJS
  122. $!
  123. $ write sys$output "Building strings.exe"
  124. $ STRINGS_OBJS="strings.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
  125. $ link/exe=strings 'STRINGS_OBJS
  126. $!
  127. $ write sys$output "Building size.exe"
  128. $ SIZE_OBJS="size.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
  129. $ link/exe=size 'SIZE_OBJS
  130. $!
  131. $ write sys$output "Building addr2line.exe"
  132. $ ADDR2LINE_OBJS="addr2line.obj" + BULIBS_FILES + BFDLIB + LIBIBERTY
  133. $ link/exe=addr2line 'ADDR2LINE_OBJS
  134. $!
  135. $ write sys$output "Building objdump.exe"
  136. $ OBJDUMP_OBJS="objdump.obj,prdbg.obj" + DEBUG_FILES + BULIBS_FILES +-
  137. BFDLIB + OPCODES + LIBIBERTY
  138. $ link/exe=objdump 'OBJDUMP_OBJS
  139. $EOD