1 /* Configuration for GCC for Intel 80386 running DJGPP. 2 Copyright (C) 1988-2016 Free Software Foundation, Inc. 3 4 This file is part of GCC. 5 6 GCC is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 3, or (at your option) 9 any later version. 10 11 GCC is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with GCC; see the file COPYING3. If not see 18 <http://www.gnu.org/licenses/>. */ 19 20 /* Use semicolons to separate elements of a path. */ 21 #define PATH_SEPARATOR ';' 22 23 #define HOST_EXECUTABLE_SUFFIX ".exe" 24 25 /* Define standard DJGPP installation paths. */ 26 /* We override default /usr or /usr/local part with /dev/env/DJDIR which */ 27 /* points to actual DJGPP installation directory. */ 28 29 /* Native system include directory */ 30 #undef NATIVE_SYSTEM_HEADER_DIR 31 #define NATIVE_SYSTEM_HEADER_DIR "/dev/env/DJDIR/include/" 32 33 /* Search for as.exe and ld.exe in DJGPP's binary directory. */ 34 #undef MD_EXEC_PREFIX 35 #define MD_EXEC_PREFIX "/dev/env/DJDIR/bin/" 36 37 /* Standard DJGPP library and startup files */ 38 #undef STANDARD_STARTFILE_PREFIX_1 39 #define STANDARD_STARTFILE_PREFIX_1 "/dev/env/DJDIR/lib/" 40 41 /* Define STANDARD_STARTFILE_PREFIX_2 equal to STANDARD_STARTFILE_PREFIX_1 42 to avoid gcc.c redefining it to /usr/lib */ 43 #undef STANDARD_STARTFILE_PREFIX_2 44 #define STANDARD_STARTFILE_PREFIX_1 "/dev/env/DJDIR/lib/" 45 46 /* Make sure that gcc will not look for .h files in /usr/local/include 47 unless user explicitly requests it. */ 48 #undef LOCAL_INCLUDE_DIR 49 50 /* System dependent initialization for collect2 51 to tell system() to act like Unix. */ 52 #define COLLECT2_HOST_INITIALIZATION \ 53 do { __system_flags |= (__system_allow_multiple_cmds \ 54 | __system_emulate_chdir); } while (0) 55 56 /* Define a version appropriate for DOS. */ 57 #undef XREF_FILE_NAME 58 #define XREF_FILE_NAME(xref_file, file) \ 59 do { \ 60 const char xref_ext[] = ".gxref"; \ 61 strcpy (xref_file, file); \ 62 s = basename (xref_file); \ 63 t = strchr (s, '.'); \ 64 if (t) \ 65 strcpy (t, xref_ext); \ 66 else \ 67 strcat (xref_file, xref_ext); \ 68 } while (0) 69 70 #undef GCC_DRIVER_HOST_INITIALIZATION 71 #define GCC_DRIVER_HOST_INITIALIZATION \ 72 do { \ 73 /* If the environment variable DJDIR is not defined, then DJGPP is not \ 74 installed correctly and GCC will quickly become confused with the \ 75 default prefix settings. Report the problem now so the user doesn't \ 76 receive deceptive "file not found" error messages later. */ \ 77 char *djdir = getenv ("DJDIR"); \ 78 if (djdir == NULL) \ 79 { \ 80 /* DJDIR is automatically defined by the DJGPP environment config \ 81 file pointed to by the environment variable DJGPP. Examine DJGPP \ 82 to try and figure out what's wrong. */ \ 83 char *djgpp = getenv ("DJGPP"); \ 84 if (djgpp == NULL) \ 85 fatal_error (UNKNOWN_LOCATION, "environment variable DJGPP not defined"); \ 86 else if (access (djgpp, R_OK) == 0) \ 87 fatal_error (UNKNOWN_LOCATION, "environment variable DJGPP points to missing file '%s'", \ 88 djgpp); \ 89 else \ 90 fatal_error (UNKNOWN_LOCATION, "environment variable DJGPP points to corrupt file '%s'", \ 91 djgpp); \ 92 } \ 93 } while (0) 94 95 /* Canonicalize paths containing '/dev/env/'; used in prefix.c. 96 _fixpath is a djgpp-specific function to canonicalize a path. 97 "/dev/env/DJDIR" evaluates to "c:/djgpp" if DJDIR is "c:/djgpp" for 98 example. It removes any trailing '/', so add it back. */ 99 /* We cannot free PATH below as it can point to string constant */ 100 #define UPDATE_PATH_HOST_CANONICALIZE(PATH) \ 101 if (memcmp ((PATH), "/dev/env/", sizeof("/dev/env/") - 1) == 0) \ 102 { \ 103 static char fixed_path[FILENAME_MAX + 1]; \ 104 \ 105 _fixpath ((PATH), fixed_path); \ 106 strcat (fixed_path, "/"); \ 107 (PATH) = xstrdup (fixed_path); \ 108 } 109 110 #undef MAX_OFILE_ALIGNMENT 111 #define MAX_OFILE_ALIGNMENT 128 112 113 /* DJGPP versions up to current (2.05) have ftw.h but only ftw() not nftw(). 114 Disable use of ftw.h */ 115 #undef HAVE_FTW_H 116