diff options
author | jdp <jdp@FreeBSD.org> | 1998-09-06 23:00:35 +0000 |
---|---|---|
committer | jdp <jdp@FreeBSD.org> | 1998-09-06 23:00:35 +0000 |
commit | 5759d4576755e035821ae7e46f25f80e4e64b127 (patch) | |
tree | 8c03749b0394a8137a721b6cbdcdfd12cc792d76 /contrib/binutils/gas | |
parent | 088484c9efa7b42bc7fcc180fd78fed96df31c63 (diff) | |
download | FreeBSD-src-5759d4576755e035821ae7e46f25f80e4e64b127.zip FreeBSD-src-5759d4576755e035821ae7e46f25f80e4e64b127.tar.gz |
Resolve conflicts from import of binutils-2.9.1.
Submitted by: Doug Rabson <dfr>
Diffstat (limited to 'contrib/binutils/gas')
-rw-r--r-- | contrib/binutils/gas/config/tc-i386.c | 323 | ||||
-rw-r--r-- | contrib/binutils/gas/config/tc-i386.h | 15 | ||||
-rwxr-xr-x | contrib/binutils/gas/configure | 1621 | ||||
-rw-r--r-- | contrib/binutils/gas/configure.in | 389 |
4 files changed, 1551 insertions, 797 deletions
diff --git a/contrib/binutils/gas/config/tc-i386.c b/contrib/binutils/gas/config/tc-i386.c index 5189c9d3..53df543 100644 --- a/contrib/binutils/gas/config/tc-i386.c +++ b/contrib/binutils/gas/config/tc-i386.c @@ -1,5 +1,6 @@ /* i386.c -- Assemble code for the Intel 80386 - Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation. + Copyright (C) 1989, 91, 92, 93, 94, 95, 96, 97, 1998 + Free Software Foundation. This file is part of GAS, the GNU Assembler. @@ -105,7 +106,7 @@ struct _i386_insn unsigned char prefix[MAX_PREFIXES]; unsigned int prefixes; - /* RM and IB are the modrm byte and the base index byte where the + /* RM and BI are the modrm byte and the base index byte where the addressing modes of this insn are encoded. */ modrm_byte rm; @@ -302,18 +303,18 @@ i386_align_code (fragP, count) {0xeb,0x0d,0x90,0x90,0x90,0x90,0x90, /* jmp .+15; lotsa nops */ 0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90}; static const char f16_4[] = - {0x8d,0xb6,0x00,0x00}; /* lea 0w(%si),%si */ + {0x8d,0xb4,0x00,0x00}; /* lea 0w(%si),%si */ static const char f16_5[] = {0x90, /* nop */ - 0x8d,0xb6,0x00,0x00}; /* lea 0w(%si),%si */ + 0x8d,0xb4,0x00,0x00}; /* lea 0w(%si),%si */ static const char f16_6[] = {0x89,0xf6, /* mov %si,%si */ 0x8d,0xbd,0x00,0x00}; /* lea 0w(%di),%di */ static const char f16_7[] = - {0x8d,0x76,0x00, /* lea 0(%si),%si */ + {0x8d,0x74,0x00, /* lea 0(%si),%si */ 0x8d,0xbd,0x00,0x00}; /* lea 0w(%di),%di */ static const char f16_8[] = - {0x8d,0xb6,0x00,0x00, /* lea 0w(%si),%si */ + {0x8d,0xb4,0x00,0x00, /* lea 0w(%si),%si */ 0x8d,0xbd,0x00,0x00}; /* lea 0w(%di),%di */ static const char *const f32_patt[] = { f32_1, f32_2, f32_3, f32_4, f32_5, f32_6, f32_7, f32_8, @@ -433,7 +434,7 @@ const pseudo_typeS md_pseudo_table[] = #ifndef I386COFF {"bss", s_bss, 0}, #endif -#ifndef OBJ_AOUT +#if !defined(OBJ_AOUT) && !defined(USE_ALIGN_PTWO) {"align", s_align_bytes, 0}, #else {"align", s_align_ptwo, 0}, @@ -802,7 +803,7 @@ int tc_i386_fix_adjustable(fixP) fixS * fixP; { -#ifndef OBJ_AOUT +#ifdef OBJ_ELF /* Prevent all adjustments to global symbols. */ if (S_IS_EXTERN (fixP->fx_addsy)) return 0; @@ -833,8 +834,8 @@ void md_assemble (line) char *line; { - /* Holds template once we've found it. */ - template *t; + /* Points to template once we've found it. */ + const template *t; /* Count the size of the instruction generated. */ int insn_size = 0; @@ -844,6 +845,11 @@ md_assemble (line) int j; + /* Wait prefix needs to come before any other prefixes, so handle it + specially. wait_prefix will hold the opcode modifier flag FWait + if a wait prefix is given. */ + int wait_prefix = 0; + /* Initialize globals. */ memset (&i, '\0', sizeof (i)); for (j = 0; j < MAX_OPERANDS; j++) @@ -852,7 +858,7 @@ md_assemble (line) memset (im_expressions, '\0', sizeof (im_expressions)); save_stack_p = save_stack; /* reset stack pointer */ - /* Fist parse an opcode & call i386_operand for the operands. + /* First parse an opcode & call i386_operand for the operands. We assume that the scrubber has arranged it so that line[0] is the valid start of a (possibly prefixed) opcode. */ { @@ -904,14 +910,27 @@ md_assemble (line) as_bad ("same prefix used twice; you don't really want this!"); return; } - if (i.prefixes == MAX_PREFIXES) + if (prefix->prefix_code == FWAIT_OPCODE) { - as_bad ("too many opcode prefixes"); - return; + if (wait_prefix != 0) + { + as_bad ("same prefix used twice; you don't really want this!"); + return; + } + wait_prefix = FWait; + } + else + { + if (i.prefixes == MAX_PREFIXES) + { + as_bad ("too many opcode prefixes"); + return; + } + i.prefix[i.prefixes++] = prefix->prefix_code; + if (prefix->prefix_code == REPE + || prefix->prefix_code == REPNE) + expecting_string_instruction = 1; } - i.prefix[i.prefixes++] = prefix->prefix_code; - if (prefix->prefix_code == REPE || prefix->prefix_code == REPNE) - expecting_string_instruction = 1; /* skip past PREFIX_SEPERATOR and reset token_start */ token_start = ++l; } @@ -1131,8 +1150,8 @@ md_assemble (line) if (!MATCH (overlap0, i.types[0]) || !MATCH (overlap1, i.types[1]) || !CONSISTENT_REGISTER_MATCH (overlap0, overlap1, - t->operand_types[0], - t->operand_types[1])) + t->operand_types[1], + t->operand_types[0])) { /* does not match either direction */ continue; @@ -1165,20 +1184,26 @@ md_assemble (line) return; } - /* Copy the template we found (we may change it!). */ + /* Copy the template we found. */ i.tm = *t; - t = &i.tm; /* alter new copy of template */ + i.tm.opcode_modifier |= wait_prefix; + + if (found_reverse_match) + { + i.tm.operand_types[0] = t->operand_types[1]; + i.tm.operand_types[1] = t->operand_types[0]; + } /* If the matched instruction specifies an explicit opcode suffix, use it - and make sure none has already been specified. */ - if (t->opcode_modifier & (Data16|Data32)) + if (i.tm.opcode_modifier & (Data16|Data32)) { if (i.suffix) { as_bad ("extraneous opcode suffix given"); return; } - if (t->opcode_modifier & Data16) + if (i.tm.opcode_modifier & Data16) i.suffix = WORD_OPCODE_SUFFIX; else i.suffix = DWORD_OPCODE_SUFFIX; @@ -1275,19 +1300,11 @@ md_assemble (line) if (overlap0 & Imm1) i.imm_operands = 0; /* kludge for shift insns */ - if (found_reverse_match) - { - unsigned int save; - save = t->operand_types[0]; - t->operand_types[0] = t->operand_types[1]; - t->operand_types[1] = save; - } - /* Finalize opcode. First, we change the opcode based on the operand size given by i.suffix: we never have to change things for byte insns, or when no opcode suffix is need to size the operands. */ - if (!i.suffix && (t->opcode_modifier & W)) + if (!i.suffix && (i.tm.opcode_modifier & W)) { as_bad ("no opcode suffix given and no register operands; can't size instruction"); return; @@ -1296,15 +1313,15 @@ md_assemble (line) if (i.suffix && i.suffix != BYTE_OPCODE_SUFFIX) { /* Select between byte and word/dword operations. */ - if (t->opcode_modifier & W) - t->base_opcode |= W; + if (i.tm.opcode_modifier & W) + i.tm.base_opcode |= W; /* Now select between word & dword operations via the operand size prefix. */ if ((i.suffix == WORD_OPCODE_SUFFIX) ^ flag_16bit_code) { if (i.prefixes == MAX_PREFIXES) { - as_bad ("%d prefixes given and 'w' opcode suffix gives too many prefixes", + as_bad ("%d prefixes given and data size prefix gives too many prefixes", MAX_PREFIXES); return; } @@ -1331,12 +1348,12 @@ md_assemble (line) if (found_reverse_match) { - t->base_opcode |= found_reverse_match; + i.tm.base_opcode |= found_reverse_match; } /* The imul $imm, %reg instruction is converted into imul $imm, %reg, %reg. */ - if (t->opcode_modifier & imulKludge) + if (i.tm.opcode_modifier & imulKludge) { /* Pretend we saw the 3 operand case. */ i.regs[2] = i.regs[1]; @@ -1344,7 +1361,7 @@ md_assemble (line) } /* The clr %reg instruction is converted into xor %reg, %reg. */ - if (t->opcode_modifier & iclrKludge) + if (i.tm.opcode_modifier & iclrKludge) { i.regs[1] = i.regs[0]; i.reg_operands = 2; @@ -1355,7 +1372,7 @@ md_assemble (line) instructions, if the source operand is a register, we must reverse the i.rm.reg and i.rm.regmem fields. We accomplish this by faking that the two register operands were given in the reverse order. */ - if ((t->opcode_modifier & ReverseRegRegmem) && i.reg_operands == 2) + if ((i.tm.opcode_modifier & ReverseRegRegmem) && i.reg_operands == 2) { unsigned int first_reg_operand = (i.types[0] & Reg) ? 0 : 1; unsigned int second_reg_operand = first_reg_operand + 1; @@ -1364,40 +1381,40 @@ md_assemble (line) i.regs[second_reg_operand] = tmp; } - if (t->opcode_modifier & ShortForm) + if (i.tm.opcode_modifier & ShortForm) { /* The register or float register operand is in operand 0 or 1. */ unsigned int op = (i.types[0] & (Reg | FloatReg)) ? 0 : 1; /* Register goes in low 3 bits of opcode. */ - t->base_opcode |= i.regs[op]->reg_num; + i.tm.base_opcode |= i.regs[op]->reg_num; } - else if (t->opcode_modifier & ShortFormW) + else if (i.tm.opcode_modifier & ShortFormW) { /* Short form with 0x8 width bit. Register is always dest. operand */ - t->base_opcode |= i.regs[1]->reg_num; + i.tm.base_opcode |= i.regs[1]->reg_num; if (i.suffix == WORD_OPCODE_SUFFIX || i.suffix == DWORD_OPCODE_SUFFIX) - t->base_opcode |= 0x8; + i.tm.base_opcode |= 0x8; } - else if (t->opcode_modifier & Seg2ShortForm) + else if (i.tm.opcode_modifier & Seg2ShortForm) { - if (t->base_opcode == POP_SEG_SHORT && i.regs[0]->reg_num == 1) + if (i.tm.base_opcode == POP_SEG_SHORT && i.regs[0]->reg_num == 1) { as_bad ("you can't 'pop cs' on the 386."); return; } - t->base_opcode |= (i.regs[0]->reg_num << 3); + i.tm.base_opcode |= (i.regs[0]->reg_num << 3); } - else if (t->opcode_modifier & Seg3ShortForm) + else if (i.tm.opcode_modifier & Seg3ShortForm) { /* 'push %fs' is 0x0fa0; 'pop %fs' is 0x0fa1. 'push %gs' is 0x0fa8; 'pop %fs' is 0x0fa9. So, only if i.regs[0]->reg_num == 5 (%gs) do we need to change the opcode. */ if (i.regs[0]->reg_num == 5) - t->base_opcode |= 0x08; + i.tm.base_opcode |= 0x08; } - else if ((t->base_opcode & ~DW) == MOV_AX_DISP32) + else if ((i.tm.base_opcode & ~DW) == MOV_AX_DISP32) { /* This is a special non-modrm instruction that addresses memory with a 32-bit displacement mode anyway, @@ -1405,12 +1422,12 @@ md_assemble (line) uses_mem_addrmode = 1; default_seg = &ds; } - else if (t->opcode_modifier & Modrm) + else if (i.tm.opcode_modifier & Modrm) { - /* The opcode is completed (modulo t->extension_opcode which must - be put into the modrm byte. - Now, we make the modrm & index base bytes based on all the info - we've collected. */ + /* The opcode is completed (modulo i.tm.extension_opcode which + must be put into the modrm byte). + Now, we make the modrm & index base bytes based on all the + info we've collected. */ /* i.reg_operands MUST be the number of real register operands; implicit registers do not count. */ @@ -1562,10 +1579,10 @@ md_assemble (line) } /* Fill in i.rm.reg or i.rm.regmem field with register - operand (if any) based on - t->extension_opcode. Again, we must be careful to - make sure that segment/control/debug/test/MMX - registers are coded into the i.rm.reg field. */ + operand (if any) based on i.tm.extension_opcode. + Again, we must be careful to make sure that + segment/control/debug/test/MMX registers are coded + into the i.rm.reg field. */ if (i.reg_operands) { unsigned int op = @@ -1580,7 +1597,7 @@ md_assemble (line) : 2)); /* If there is an extension opcode to put here, the register number must be put into the regmem field. */ - if (t->extension_opcode != None) + if (i.tm.extension_opcode != None) i.rm.regmem = i.regs[op]->reg_num; else i.rm.reg = i.regs[op]->reg_num; @@ -1593,8 +1610,8 @@ md_assemble (line) } /* Fill in i.rm.reg field with extension opcode (if any). */ - if (t->extension_opcode != None) - i.rm.reg = t->extension_opcode; + if (i.tm.extension_opcode != None) + i.rm.reg = i.tm.extension_opcode; } if (i.rm.mode != 3) @@ -1635,9 +1652,9 @@ md_assemble (line) } /* Handle conversion of 'int $3' --> special int3 insn. */ - if (t->base_opcode == INT_OPCODE && i.imms[0]->X_add_number == 3) + if (i.tm.base_opcode == INT_OPCODE && i.imms[0]->X_add_number == 3) { - t->base_opcode = INT3_OPCODE; + i.tm.base_opcode = INT3_OPCODE; i.imm_operands = 0; } @@ -1646,7 +1663,7 @@ md_assemble (line) register char *p; /* Output jumps. */ - if (t->opcode_modifier & Jump) + if (i.tm.opcode_modifier & Jump) { unsigned long n = i.disps[0]->X_add_number; @@ -1656,7 +1673,7 @@ md_assemble (line) { p = frag_more (2); insn_size += 2; - p[0] = t->base_opcode; + p[0] = i.tm.base_opcode; p[1] = n; } else @@ -1673,7 +1690,7 @@ md_assemble (line) return; } - if (t->base_opcode == JUMP_PC_RELATIVE) + if (i.tm.base_opcode == JUMP_PC_RELATIVE) { /* pace */ /* unconditional jump */ p = frag_more (1 + jmp_size); @@ -1687,7 +1704,7 @@ md_assemble (line) p = frag_more (2 + jmp_size); insn_size += 2 + jmp_size; p[0] = TWO_BYTE_OPCODE_ESCAPE; - p[1] = t->base_opcode + 0x10; + p[1] = i.tm.base_opcode + 0x10; md_number_to_chars (&p[2], (valueT) n, jmp_size); } } @@ -1706,7 +1723,7 @@ md_assemble (line) frag_grow (7); p = frag_more (1); insn_size += 1; - p[0] = t->base_opcode; + p[0] = i.tm.base_opcode; frag_var (rs_machine_dependent, 6, /* 2 opcode/prefix + 4 displacement */ 1, @@ -1717,9 +1734,9 @@ md_assemble (line) (offsetT) n, p); } } - else if (t->opcode_modifier & (JumpByte | JumpDword)) + else if (i.tm.opcode_modifier & (JumpByte | JumpDword)) { - int size = (t->opcode_modifier & JumpByte) ? 1 : 4; + int size = (i.tm.opcode_modifier & JumpByte) ? 1 : 4; unsigned long n = i.disps[0]->X_add_number; unsigned char *q; @@ -1728,7 +1745,29 @@ md_assemble (line) { if (*q == WORD_PREFIX_OPCODE) { - FRAG_APPEND_1_CHAR (WORD_PREFIX_OPCODE); + /* The jcxz/jecxz instructions are marked with Data16 + and Data32, which means that they may get + WORD_PREFIX_OPCODE added to the list of prefixes. + However, the are correctly distinguished using + ADDR_PREFIX_OPCODE. Here we look for + WORD_PREFIX_OPCODE, and actually emit + ADDR_PREFIX_OPCODE. This is a hack, but, then, so + is the instruction itself. + + If an explicit suffix is used for the loop + instruction, that actually controls whether we use + cx vs. ecx. This is also controlled by + ADDR_PREFIX_OPCODE. + + I don't know if there is any valid case in which we + want to emit WORD_PREFIX_OPCODE, but I am keeping + the old behaviour for safety. */ + + if (IS_JUMP_ON_CX_ZERO (i.tm.base_opcode) + || IS_LOOP_ECX_TIMES (i.tm.base_opcode)) + FRAG_APPEND_1_CHAR (ADDR_PREFIX_OPCODE); + else + FRAG_APPEND_1_CHAR (WORD_PREFIX_OPCODE); insn_size += 1; break; } @@ -1740,9 +1779,9 @@ md_assemble (line) insn_size += 1; } - if (fits_in_unsigned_byte (t->base_opcode)) + if (fits_in_unsigned_byte (i.tm.base_opcode)) { - FRAG_APPEND_1_CHAR (t->base_opcode); + FRAG_APPEND_1_CHAR (i.tm.base_opcode); insn_size += 1; } else @@ -1750,8 +1789,8 @@ md_assemble (line) p = frag_more (2); /* opcode can be at most two bytes */ insn_size += 2; /* put out high byte first: can't use md_number_to_chars! */ - *p++ = (t->base_opcode >> 8) & 0xff; - *p = t->base_opcode & 0xff; + *p++ = (i.tm.base_opcode >> 8) & 0xff; + *p = i.tm.base_opcode & 0xff; } p = frag_more (size); @@ -1772,7 +1811,7 @@ md_assemble (line) } } - else if (t->opcode_modifier & JumpInterSegment) + else if (i.tm.opcode_modifier & JumpInterSegment) { if (flag_16bit_code) { @@ -1782,7 +1821,7 @@ md_assemble (line) p = frag_more (1 + 2 + 4); /* 1 opcode; 2 segment; 4 offset */ insn_size += 1 + 2 + 4; - p[0] = t->base_opcode; + p[0] = i.tm.base_opcode; if (i.imms[1]->X_op == O_constant) md_number_to_chars (p + 1, (valueT) i.imms[1]->X_add_number, 4); else @@ -1797,7 +1836,16 @@ md_assemble (line) /* Output normal instructions here. */ unsigned char *q; - /* First the prefix bytes. */ + /* Hack for fwait. It must come before any prefixes, as it + really is an instruction rather than a prefix. */ + if ((i.tm.opcode_modifier & FWait) != 0) + { + p = frag_more (1); + insn_size += 1; + md_number_to_chars (p, (valueT) FWAIT_OPCODE, 1); + } + + /* The prefix bytes. */ for (q = i.prefix; q < i.prefix + i.prefixes; q++) { p = frag_more (1); @@ -1806,39 +1854,39 @@ md_assemble (line) } /* Now the opcode; be careful about word order here! */ - if (fits_in_unsigned_byte (t->base_opcode)) + if (fits_in_unsigned_byte (i.tm.base_opcode)) { - FRAG_APPEND_1_CHAR (t->base_opcode); + FRAG_APPEND_1_CHAR (i.tm.base_opcode); insn_size += 1; } - else if (fits_in_unsigned_word (t->base_opcode)) + else if (fits_in_unsigned_word (i.tm.base_opcode)) { p = frag_more (2); insn_size += 2; /* put out high byte first: can't use md_number_to_chars! */ - *p++ = (t->base_opcode >> 8) & 0xff; - *p = t->base_opcode & 0xff; + *p++ = (i.tm.base_opcode >> 8) & 0xff; + *p = i.tm.base_opcode & 0xff; } else { /* opcode is either 3 or 4 bytes */ - if (t->base_opcode & 0xff000000) + if (i.tm.base_opcode & 0xff000000) { p = frag_more (4); insn_size += 4; - *p++ = (t->base_opcode >> 24) & 0xff; + *p++ = (i.tm.base_opcode >> 24) & 0xff; } else { p = frag_more (3); insn_size += 3; } - *p++ = (t->base_opcode >> 16) & 0xff; - *p++ = (t->base_opcode >> 8) & 0xff; - *p = (t->base_opcode) & 0xff; + *p++ = (i.tm.base_opcode >> 16) & 0xff; + *p++ = (i.tm.base_opcode >> 8) & 0xff; + *p = (i.tm.base_opcode) & 0xff; } /* Now the modrm byte and base index byte (if present). */ - if (t->opcode_modifier & Modrm) + if (i.tm.opcode_modifier & Modrm) { p = frag_more (1); insn_size += 1; @@ -2090,6 +2138,16 @@ i386_operand (operand_string) input_line_pointer = ++op_string; /* must advance op_string! */ SKIP_WHITESPACE (); exp_seg = expression (exp); + if (*input_line_pointer != '\0') + { + /* This should be as_bad, but some versions of gcc, up to + about 2.8 and egcs 1.01, generate a bogus @GOTOFF(%ebx) + in certain cases. Oddly, the code in question turns out + to work correctly anyhow, so we make this just a warning + until those versions of gcc are obsolete. */ + as_warn ("warning: unrecognized characters `%s' in expression", + input_line_pointer); + } input_line_pointer = save_input_line_pointer; if (exp->X_op == O_absent) @@ -2159,7 +2217,7 @@ i386_operand (operand_string) i.mem_operands++; /* Determine type of memory operand from opcode_suffix; - no opcode suffix implies general memory references. */ + no opcode suffix implies general memory references. */ switch (i.suffix) { case BYTE_OPCODE_SUFFIX: @@ -2330,6 +2388,7 @@ i386_operand (operand_string) save_input_line_pointer = input_line_pointer; input_line_pointer = displacement_string_start; END_STRING_AND_SAVE (displacement_string_end); + #ifndef LEX_AT { /* @@ -2339,36 +2398,49 @@ i386_operand (operand_string) * into a temporary buffer... */ register char *cp; - if ((cp = strchr (input_line_pointer,'@')) != NULL) { - char tmpbuf[BUFSIZ]; - - if(!GOT_symbol) - GOT_symbol = symbol_find_or_make(GLOBAL_OFFSET_TABLE_NAME); - - if (strncmp(cp+1, "PLT", 3) == 0) { - i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32; - *cp = '\0'; - strcpy(tmpbuf, input_line_pointer); - strcat(tmpbuf, cp+1+3); - *cp = '@'; - } else if (strncmp(cp+1, "GOTOFF", 6) == 0) { - i.disp_reloc[this_operand] = BFD_RELOC_386_GOTOFF; - *cp = '\0'; - strcpy(tmpbuf, input_line_pointer); - strcat(tmpbuf, cp+1+6); - *cp = '@'; - } else if (strncmp(cp+1, "GOT", 3) == 0) { - i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32; - *cp = '\0'; - strcpy(tmpbuf, input_line_pointer); - strcat(tmpbuf, cp+1+3); - *cp = '@'; - } else - as_bad("Bad reloc specifier '%s' in expression", cp+1); - input_line_pointer = tmpbuf; - } + + cp = strchr (input_line_pointer, '@'); + if (cp != NULL) + { + char *tmpbuf; + + if (GOT_symbol == NULL) + GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME); + + tmpbuf = (char *) alloca ((cp - input_line_pointer) + 20); + + if (strncmp (cp + 1, "PLT", 3) == 0) + { + i.disp_reloc[this_operand] = BFD_RELOC_386_PLT32; + *cp = '\0'; + strcpy (tmpbuf, input_line_pointer); + strcat (tmpbuf, cp + 1 + 3); + *cp = '@'; + } + else if (strncmp (cp + 1, "GOTOFF", 6) == 0) + { + i.disp_reloc[this_operand] = BFD_RELOC_386_GOTOFF; + *cp = '\0'; + strcpy (tmpbuf, input_line_pointer); + strcat (tmpbuf, cp + 1 + 6); + *cp = '@'; + } + else if (strncmp (cp + 1, "GOT", 3) == 0) + { + i.disp_reloc[this_operand] = BFD_RELOC_386_GOT32; + *cp = '\0'; + strcpy (tmpbuf, input_line_pointer); + strcat (tmpbuf, cp + 1 + 3); + *cp = '@'; + } + else + as_bad ("Bad reloc specifier '%s' in expression", cp + 1); + + input_line_pointer = tmpbuf; + } } #endif + exp_seg = expression (exp); #ifdef BFD_ASSEMBLER @@ -2683,6 +2755,9 @@ md_apply_fix3 (fixP, valp, seg) register char *p = fixP->fx_where + fixP->fx_frag->fr_literal; valueT value = *valp; + if (fixP->fx_r_type == BFD_RELOC_32 && fixP->fx_pcrel) + fixP->fx_r_type = BFD_RELOC_32_PCREL; + #if defined (BFD_ASSEMBLER) && !defined (TE_Mach) /* * This is a hack. There should be a better way to @@ -2691,7 +2766,8 @@ md_apply_fix3 (fixP, valp, seg) if (fixP->fx_r_type == BFD_RELOC_32_PCREL && fixP->fx_addsy) { #ifndef OBJ_AOUT - if (OUTPUT_FLAVOR == bfd_target_elf_flavour) + if (OUTPUT_FLAVOR == bfd_target_elf_flavour + || OUTPUT_FLAVOR == bfd_target_coff_flavour) value += fixP->fx_where + fixP->fx_frag->fr_address; #endif #if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) @@ -2706,6 +2782,12 @@ md_apply_fix3 (fixP, valp, seg) value += fixP->fx_where + fixP->fx_frag->fr_address; } #endif +#if defined (OBJ_COFF) && defined (TE_PE) + /* For some reason, the PE format does not store a section + address offset for a PC relative symbol. */ + if (S_GET_SEGMENT (fixP->fx_addsy) != seg) + value += md_pcrel_from (fixP); +#endif } /* Fix a few things - the dynamic linker expects certain values here, @@ -3055,6 +3137,7 @@ tc_gen_reloc (section, fixp) case BFD_RELOC_386_GOT32: case BFD_RELOC_386_GOTOFF: case BFD_RELOC_386_GOTPC: + case BFD_RELOC_RVA: code = fixp->fx_r_type; break; default: diff --git a/contrib/binutils/gas/config/tc-i386.h b/contrib/binutils/gas/config/tc-i386.h index 139ccc7..d095d3e 100644 --- a/contrib/binutils/gas/config/tc-i386.h +++ b/contrib/binutils/gas/config/tc-i386.h @@ -1,5 +1,5 @@ /* tc-i386.h -- Header file for tc-i386.c - Copyright (C) 1989, 92, 93, 94, 95, 96, 1997 Free Software Foundation. + Copyright (C) 1989, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation. This file is part of GAS, the GNU Assembler. @@ -300,6 +300,7 @@ typedef struct #define Data16 0x20000 /* needs data prefix if in 32-bit mode */ #define Data32 0x40000 /* needs data prefix if in 16-bit mode */ #define iclrKludge 0x80000 /* used to convert clr to xor */ +#define FWait 0x100000 /* instruction needs FWAIT */ /* (opcode_modifier & COMES_IN_ALL_SIZES) is true if the instuction comes in byte, word, and dword sizes and is encoded into @@ -401,10 +402,18 @@ extern const struct relax_type md_relax_table[]; extern int flag_16bit_code; +#ifdef BFD_ASSEMBLER +#define md_maybe_text() \ + ((bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0) +#else +#define md_maybe_text() \ + (now_seg != data_section && now_seg != bss_section) +#endif + #define md_do_align(n, fill, len, max, around) \ if ((n) && !need_pass_2 \ && (!(fill) || ((char)*(fill) == (char)0x90 && (len) == 1)) \ - && now_seg != data_section && now_seg != bss_section) \ + && md_maybe_text ()) \ { \ char *p; \ p = frag_var (rs_align_code, 15, 1, (relax_substateT) max, \ @@ -434,4 +443,6 @@ void i386_print_statistics PARAMS ((FILE *)); extern void sco_id PARAMS ((void)); #endif +#define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */ + /* end of tc-i386.h */ diff --git a/contrib/binutils/gas/configure b/contrib/binutils/gas/configure index 9498428..93abf8e 100755 --- a/contrib/binutils/gas/configure +++ b/contrib/binutils/gas/configure @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12 +# Generated automatically using autoconf version 2.12.1 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -12,13 +12,24 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help + --enable-shared build shared libraries [default=yes] + --enable-shared=PKGS only build shared libraries if the current package + appears as an element in the PKGS list" +ac_help="$ac_help + --enable-static build static libraries [default=yes] + --enable-static=PKGS only build shared libraries if the current package + appears as an element in the PKGS list" +ac_help="$ac_help + --with-gnu-ld assume the C compiler uses GNU ld [default=no]" +ac_help="$ac_help --enable-bfd-assembler use BFD back end for writing object files" ac_help="$ac_help targets alternative target configurations besides the primary" ac_help="$ac_help - --enable-shared build shared BFD library" -ac_help="$ac_help --enable-commonbfdlib build shared BFD/opcodes/libiberty library" +ac_help="$ac_help + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -57,6 +68,7 @@ mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 @@ -340,7 +352,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12" + echo "configure generated by autoconf version 2.12.1" exit 0 ;; -with-* | --with-*) @@ -525,54 +537,10 @@ else ac_n= ac_c='\c' ac_t= fi -user_bfd_gas= -# Check whether --enable-bfd-assembler or --disable-bfd-assembler was given. -if test "${enable_bfd_assembler+set}" = set; then - enableval="$enable_bfd_assembler" - case "${enableval}" in - yes) need_bfd=yes user_bfd_gas=yes ;; - no) user_bfd_gas=no ;; - *) { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;; -esac -fi -# Check whether --enable-targets or --disable-targets was given. -if test "${enable_targets+set}" = set; then - enableval="$enable_targets" - case "${enableval}" in - yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; } - ;; - no) enable_targets= ;; - *) enable_targets=$enableval ;; -esac -fi -# Check whether --enable-shared or --disable-shared was given. -if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - case "${enableval}" in - yes) shared=true shared_bfd=true shared_opcodes=true ;; - no) shared=false ;; - *bfd*opcodes*) shared=true shared_bfd=true shared_opcodes=true ;; - *opcodes*bfd*) shared=true shared_bfd=true shared_opcodes=true ;; - *bfd*) shared=true shared_bfd=true ;; - *opcodes*) shared=true shared_opcodes=true ;; - *) shared=false ;; -esac -fi -# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given. -if test "${enable_commonbfdlib+set}" = set; then - enableval="$enable_commonbfdlib" - case "${enableval}" in - yes) commonbfdlib=true ;; - no) commonbfdlib=false ;; - *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;; -esac -fi - -# Generate a header file -- gets more post-processing by Makefile later. ac_aux_dir= -for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" @@ -584,7 +552,7 @@ for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do fi done if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; } + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub @@ -613,33 +581,33 @@ esac # Make sure we can run config.sub. -if $ac_config_sub sun4 >/dev/null 2>&1; then : +if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:622: checking host system type" >&5 +echo "configure:590: checking host system type" >&5 host_alias=$host case "$host_alias" in NONE) case $nonopt in NONE) - if host_alias=`$ac_config_guess`; then : + if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } fi ;; *) host_alias=$nonopt ;; esac ;; esac -host=`$ac_config_sub $host_alias` +host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:643: checking target system type" >&5 +echo "configure:611: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -650,14 +618,14 @@ NONE) esac ;; esac -target=`$ac_config_sub $target_alias` +target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:661: checking build system type" >&5 +echo "configure:629: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -668,7 +636,7 @@ NONE) esac ;; esac -build=`$ac_config_sub $build_alias` +build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` @@ -679,6 +647,110 @@ test "$host_alias" != "$target_alias" && NONENONEs,x,x, && program_prefix=${target_alias}- + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +echo "configure:664: checking for a BSD compatible install" >&5 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + else + ac_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_IFS" + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + +echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 +echo "configure:718: checking whether build environment is sane" >&5 +# Just in case +sleep 1 +echo timestamp > conftestfile +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "$*" != "X $srcdir/configure conftestfile" \ + && test "$*" != "X conftestfile $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { echo "configure: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" 1>&2; exit 1; } + fi + + test "$2" = conftestfile + ) +then + # Ok. + : +else + { echo "configure: error: newly created file is older than distributed files! +Check your system clock" 1>&2; exit 1; } +fi +rm -f conftest* +echo "$ac_t""yes" 1>&6 if test "$program_transform_name" = s,x,x,; then program_transform_name= else @@ -698,6 +770,588 @@ test "$program_suffix" != NONE && # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:775: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + +PACKAGE=gas + +VERSION=2.9.1 + +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } +fi +cat >> confdefs.h <<EOF +#define PACKAGE "$PACKAGE" +EOF + +cat >> confdefs.h <<EOF +#define VERSION "$VERSION" +EOF + + + +missing_dir=`cd $ac_aux_dir && pwd` +echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 +echo "configure:821: checking for working aclocal" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (aclocal --version) < /dev/null > /dev/null 2>&1; then + ACLOCAL=aclocal + echo "$ac_t""found" 1>&6 +else + ACLOCAL="$missing_dir/missing aclocal" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 +echo "configure:834: checking for working autoconf" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoconf --version) < /dev/null > /dev/null 2>&1; then + AUTOCONF=autoconf + echo "$ac_t""found" 1>&6 +else + AUTOCONF="$missing_dir/missing autoconf" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working automake""... $ac_c" 1>&6 +echo "configure:847: checking for working automake" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (automake --version) < /dev/null > /dev/null 2>&1; then + AUTOMAKE=automake + echo "$ac_t""found" 1>&6 +else + AUTOMAKE="$missing_dir/missing automake" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 +echo "configure:860: checking for working autoheader" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (autoheader --version) < /dev/null > /dev/null 2>&1; then + AUTOHEADER=autoheader + echo "$ac_t""found" 1>&6 +else + AUTOHEADER="$missing_dir/missing autoheader" + echo "$ac_t""missing" 1>&6 +fi + +echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 +echo "configure:873: checking for working makeinfo" >&5 +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if (makeinfo --version) < /dev/null > /dev/null 2>&1; then + MAKEINFO=makeinfo + echo "$ac_t""found" 1>&6 +else + MAKEINFO="$missing_dir/missing makeinfo" + echo "$ac_t""missing" 1>&6 +fi + + + +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + p=${PACKAGE-default} +case "$enableval" in +yes) enable_shared=yes ;; +no) enable_shared=no ;; +*) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac +else + enable_shared=yes +fi + +# Check whether --enable-static or --disable-static was given. +if test "${enable_static+set}" = set; then + enableval="$enable_static" + p=${PACKAGE-default} +case "$enableval" in +yes) enable_static=yes ;; +no) enable_static=no ;; +*) + enable_static=no + # Look at the argument we got. We use all the common list separators. + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," + for pkg in $enableval; do + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$ac_save_ifs" + ;; +esac +else + enable_static=yes +fi + +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:936: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:965: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:994: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + ac_prog_rejected=no + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:1042: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext <<EOF +#line 1052 "configure" +#include "confdefs.h" +main(){return(0);} +EOF +if { (eval echo configure:1056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:1076: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:1081: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <<EOF +#ifdef __GNUC__ + yes; +#endif +EOF +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes + ac_test_CFLAGS="${CFLAGS+set}" + ac_save_CFLAGS="$CFLAGS" + CFLAGS= + echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:1105: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 + if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" + elif test $ac_cv_prog_cc_g = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-O2" + fi +else + GCC= + test "${CFLAGS+set}" = set || CFLAGS="-g" +fi + +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi + + +ac_prog=ld +if test "$ac_cv_prog_gcc" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 +echo "configure:1145: checking for ld used by GCC" >&5 + ac_prog=`($CC -print-prog-name=ld) 2>&5` + case "$ac_prog" in + # Accept absolute paths. + /* | [A-Za-z]:\\*) + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 +echo "configure:1163: checking for GNU ld" >&5 +else + echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 +echo "configure:1166: checking for non-GNU ld" >&5 +fi +if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog"; then + ac_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + ac_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$ac_cv_path_LD" +if test -n "$LD"; then + echo "$ac_t""$LD" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi +test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } + +echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 +echo "configure:1202: checking if the linker ($LD) is GNU ld" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then + ac_cv_prog_gnu_ld=yes +else + ac_cv_prog_gnu_ld=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 + + +echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 +echo "configure:1218: checking for BSD-compatible nm" >&5 +if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$NM" in +/* | [A-Za-z]:\\*) + ac_cv_path_NM="$NM" # Let the user override the test with a path. + ;; +*) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/nm; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$ac_dir/nm -B" + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$ac_dir/nm -p" + else + ac_cv_path_NM="$ac_dir/nm" + fi + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm + ;; +esac +fi + +NM="$ac_cv_path_NM" +echo "$ac_t""$NM" 1>&6 + + +echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 +echo "configure:1255: checking whether ln -s works" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftestdata +if ln -s X conftestdata 2>/dev/null +then + rm -f conftestdata + ac_cv_prog_LN_S="ln -s" +else + ac_cv_prog_LN_S=ln +fi +fi +LN_S="$ac_cv_prog_LN_S" +if test "$ac_cv_prog_LN_S" = "ln -s"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Check for any special flags to pass to ltconfig. +libtool_flags= +test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" +test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" +test "$silent" = yes && libtool_flags="$libtool_flags --silent" +test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" +test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case "$host" in +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 1291 "configure"' > conftest.$ac_ext + if { (eval echo configure:1292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + CFLAGS="$CFLAGS -belf" + ;; +esac + +# Actually configure libtool. ac_aux_dir is where install-sh is found. +CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ +LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \ +${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \ +$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ +|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; } + + +user_bfd_gas= +# Check whether --enable-bfd-assembler or --disable-bfd-assembler was given. +if test "${enable_bfd_assembler+set}" = set; then + enableval="$enable_bfd_assembler" + case "${enableval}" in + yes) need_bfd=yes user_bfd_gas=yes ;; + no) user_bfd_gas=no ;; + *) { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;; +esac +fi +# Check whether --enable-targets or --disable-targets was given. +if test "${enable_targets+set}" = set; then + enableval="$enable_targets" + case "${enableval}" in + yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; } + ;; + no) enable_targets= ;; + *) enable_targets=$enableval ;; +esac +fi +# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given. +if test "${enable_commonbfdlib+set}" = set; then + enableval="$enable_commonbfdlib" + case "${enableval}" in + yes) commonbfdlib=true ;; + no) commonbfdlib=false ;; + *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;; +esac +fi + +# Generate a header file + + + te_file=generic @@ -734,9 +1388,13 @@ for this_target in $target $canon_targets ; do eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'` # check for architecture variants + arch= + endian= case ${cpu} in + alpha*) cpu_type=alpha ;; armeb) cpu_type=arm endian=big ;; arm*) cpu_type=arm endian=little ;; + thumb*) cpu_type=arm endian=little ;; hppa*) cpu_type=hppa ;; i[456]86) cpu_type=i386 ;; m680[012346]0) cpu_type=m68k ;; @@ -748,18 +1406,31 @@ for this_target in $target $canon_targets ; do powerpcle*) cpu_type=ppc endian=little ;; powerpc*) cpu_type=ppc endian=big ;; rs6000*) cpu_type=ppc ;; - sparc64) cpu_type=sparc want_sparc_v9=true ;; - sparc*) cpu_type=sparc ;; + sparclite*) cpu_type=sparc arch=sparclite ;; + sparclet*) cpu_type=sparc arch=sparclet ;; + sparc64*) cpu_type=sparc arch=v9-64 ;; + sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c. + v850*) cpu_type=v850 ;; *) cpu_type=${cpu} ;; esac if test ${this_target} = $target ; then target_cpu_type=${cpu_type} + if test x${endian} = xbig; then + cat >> confdefs.h <<\EOF +#define TARGET_BYTES_BIG_ENDIAN 1 +EOF + + elif test x${endian} = xlittle; then + cat >> confdefs.h <<\EOF +#define TARGET_BYTES_BIG_ENDIAN 0 +EOF + + fi elif test ${target_cpu_type} != ${cpu_type} ; then continue fi - targ=${cpu_type} generic_target=${cpu_type}-$vendor-$os dev=no bfd_gas=no @@ -767,31 +1438,28 @@ for this_target in $target $canon_targets ; do # assign object format case ${generic_target} in - a29k-*-coff) fmt=coff targ=ebmon29k ;; - a29k-amd-udi) fmt=coff targ=ebmon29k ;; - a29k-amd-ebmon) fmt=coff targ=ebmon29k ;; - a29k-nyu-sym1) fmt=coff targ=ebmon29k ;; + a29k-*-coff) fmt=coff ;; + a29k-amd-udi) fmt=coff ;; + a29k-amd-ebmon) fmt=coff ;; + a29k-nyu-sym1) fmt=coff ;; a29k-*-vxworks*) fmt=coff ;; - alpha-*-*vms*) fmt=evax ;; + alpha*-*-*vms*) fmt=evax ;; alpha-*-freebsd*) fmt=elf em=freebsd ;; - alpha-*-netware*) fmt=ecoff ;; - alpha-*-openbsd*) fmt=ecoff ;; - alpha-*-osf*) fmt=ecoff ;; - alpha-*-linuxecoff*) fmt=ecoff ;; - alpha-*-linux*) fmt=elf em=linux ;; - - - arm-*-riscix*) fmt=aout targ=arm-lit em=riscix ;; - arm-*-aout) fmt=aout - case "$endian" in - big) targ=arm-big ;; - *) targ=arm-lit ;; - esac - ;; - arm-*-coff) fmt=coff ;; + alpha*-*-netware*) fmt=ecoff ;; + alpha*-*-openbsd*) fmt=ecoff ;; + alpha*-*-osf*) fmt=ecoff ;; + alpha*-*-linuxecoff*) fmt=ecoff ;; + alpha*-*-linux-gnu*) fmt=elf em=linux ;; + alpha*-*-netbsd*) fmt=elf em=nbsd ;; + + arc-*-elf*) fmt=elf bfd_gas=yes ;; + + arm-*-riscix*) fmt=aout em=riscix ;; + arm-*-aout) fmt=aout ;; + arm-*-coff | thumb-*-coff) fmt=coff ;; arm-*-riscix*) fmt=aout ;; - arm-*-pe) fmt=coff targ=armcoff em=pe ;; + arm-*-pe | thumb-*-pe) fmt=coff em=pe ;; d10v-*-*) fmt=elf bfd_gas=yes ;; @@ -805,142 +1473,128 @@ for this_target in $target $canon_targets ; do h8300-*-coff) fmt=coff ;; - i386-ibm-aix*) fmt=coff targ=i386coff - em=i386aix ;; + i386-ibm-aix*) fmt=coff em=i386aix ;; i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;; i386-*-bsd*) fmt=aout em=386bsd ;; i386-*-netbsd0.8) fmt=aout em=386bsd ;; i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;; i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;; i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;; - i386-*-linux*coff*) fmt=coff em=linux - targ=i386coff ;; - i386-*-linux*) fmt=elf em=linux ;; - i386-*-lynxos*) fmt=coff targ=i386coff - em=lynx ;; + i386-*-linux*coff*) fmt=coff em=linux ;; + i386-*-linux-gnu*) fmt=elf em=linux ;; + i386-*-lynxos*) fmt=coff em=lynx ;; i386-*-sysv4* | i386-*-solaris* | i386-*-elf) fmt=elf ;; - i386-*-freebsdelf*) fmt=elf em=freebsd ;; + i386-*-freebsdelf*) fmt=elf em=freebsd;; i386-*-freebsd*) fmt=aout em=freebsd bfd_gas=yes ;; - i386-*-sco*elf*) fmt=elf targ=sco5 ;; - i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*) - fmt=coff targ=i386coff ;; + i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*) + fmt=coff ;; + i386-*-sco3.2v5*) fmt=elf + if test ${this_target} = $target; then + cat >> confdefs.h <<\EOF +#define SCO_ELF 1 +EOF + + fi + ;; + i386-*-sco3.2*) fmt=coff ;; i386-*-vsta) fmt=aout ;; - i386-*-go32) fmt=coff targ=i386coff ;; - i386-*-rtems*) fmt=coff targ=i386coff ;; + i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*) + fmt=coff em=go32;; + i386-*-rtems*) fmt=coff ;; i386-*-gnu*) fmt=elf ;; i386-*-mach*) fmt=aout em=mach bfd_gas=yes ;; i386-*-msdos*) fmt=aout ;; i386-*-moss*) fmt=elf ;; - i386-*-pe) fmt=coff targ=i386coff em=pe ;; - i386-*-cygwin32) fmt=coff targ=i386coff em=pe ;; - i386-*-*nt) fmt=coff targ=i386coff em=pe ;; + i386-*-pe) fmt=coff em=pe ;; + i386-*-cygwin32*) fmt=coff em=pe bfd_gas=yes ;; + i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;; + i386-*-*nt*) fmt=coff em=pe ;; i960-*-bout) fmt=bout ;; - i960-*-coff) fmt=coff em=ic960 targ=ic960coff ;; - i960-*-rtems*) fmt=coff em=ic960 targ=ic960coff ;; + i960-*-coff) fmt=coff em=ic960 ;; + i960-*-rtems*) fmt=coff em=ic960 ;; i960-*-nindy*) fmt=bout ;; i960-*-vxworks4*) fmt=bout ;; i960-*-vxworks5.0) fmt=bout ;; - i960-*-vxworks5.*) fmt=coff em=ic960 targ=ic960coff ;; + i960-*-vxworks5.*) fmt=coff em=ic960 ;; i960-*-vxworks*) fmt=bout ;; m32r-*-*) fmt=elf bfd_gas=yes ;; m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*) fmt=aout em=sun3 ;; - m68k-motorola-sysv*) fmt=coff targ=m68kcoff em=delta ;; - m68k-bull-sysv3*) fmt=coff targ=m68kcoff em=dpx2 ;; - m68k-apollo-*) fmt=coff targ=apollo em=apollo ;; + m68k-motorola-sysv*) fmt=coff em=delta ;; + m68k-bull-sysv3*) fmt=coff em=dpx2 ;; + m68k-apollo-*) fmt=coff em=apollo ;; m68k-*-sysv4*) # must be before -sysv* fmt=elf em=svr4 ;; m68k-*-elf*) fmt=elf ;; m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*) - fmt=coff targ=m68kcoff ;; + fmt=coff ;; m68k-*-hpux*) fmt=hp300 em=hp300 ;; m68k-*-linux*aout*) fmt=aout em=linux ;; - m68k-*-linux*) fmt=elf em=linux ;; - m68k-*-lynxos*) fmt=coff targ=m68kcoff - em=lynx ;; + m68k-*-linux-gnu*) fmt=elf em=linux ;; + m68k-*-lynxos*) fmt=coff em=lynx ;; m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; - m68k-apple-aux*) fmt=coff targ=m68kcoff em=aux ;; + m68k-apple-aux*) fmt=coff em=aux ;; m68k-*-psos*) fmt=elf em=psos;; - m88k-motorola-sysv3*) fmt=coff targ=m88kcoff em=delt88 ;; - m88k-*-coff*) fmt=coff targ=m88kcoff ;; + m88k-motorola-sysv3*) fmt=coff em=delt88 ;; + m88k-*-coff*) fmt=coff ;; # don't change em like *-*-bsd does - mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;; - mips-dec-openbsd*) fmt=elf targ=mips-lit endian=little ;; - mips-dec-bsd*) fmt=aout targ=mips-lit ;; - mips-sony-bsd*) fmt=ecoff targ=mips-big ;; + mips-dec-netbsd*) fmt=elf endian=little ;; + mips-dec-openbsd*) fmt=elf endian=little ;; + mips-dec-bsd*) fmt=aout ;; + mips-sony-bsd*) fmt=ecoff ;; mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;; - mips-*-ultrix*) fmt=ecoff targ=mips-lit endian=little ;; - mips-*-osf*) fmt=ecoff targ=mips-lit endian=little ;; - mips-*-ecoff*) fmt=ecoff - case "$endian" in - big) targ=mips-big ;; - *) targ=mips-lit ;; - esac - ;; - mips-*-ecoff*) fmt=ecoff targ=mips-big ;; - mips-*-irix6*) fmt=elf targ=mips-big ;; - mips-*-irix5*) fmt=elf targ=mips-big ;; - mips-*-irix*) fmt=ecoff targ=mips-big ;; - mips-*-lnews*) fmt=ecoff targ=mips-lit em=lnews ;; - mips-*-riscos*) fmt=ecoff targ=mips-big ;; - mips-*-sysv*) fmt=ecoff targ=mips-big ;; - mips-*-elf* | mips-*-rtems* | mips-*-linux* | mips-*-gnu* | mips-*-openbsd*) - fmt=elf - case "$endian" in - big) targ=mips-big ;; - *) targ=mips-lit ;; - esac - ;; + mips-*-ultrix*) fmt=ecoff endian=little ;; + mips-*-osf*) fmt=ecoff endian=little ;; + mips-*-ecoff*) fmt=ecoff ;; + mips-*-ecoff*) fmt=ecoff ;; + mips-*-irix6*) fmt=elf ;; + mips-*-irix5*) fmt=elf ;; + mips-*-irix*) fmt=ecoff ;; + mips-*-lnews*) fmt=ecoff em=lnews ;; + mips-*-riscos*) fmt=ecoff ;; + mips-*-sysv*) fmt=ecoff ;; + mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*) + fmt=elf ;; mn10200-*-*) fmt=elf bfd_gas=yes ;; mn10300-*-*) fmt=elf bfd_gas=yes ;; ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*) - fmt=coff em=pe - case "$endian" in - big) targ=ppc-big ;; - *) targ=ppc-lit ;; - esac - ;; + fmt=coff em=pe ;; ppc-*-aix*) fmt=coff ;; ppc-*-beos*) fmt=coff ;; ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*) - fmt=elf - case "$endian" in - big) targ=ppc-big ;; - *) targ=ppc-lit ;; - esac - ;; - ppc-*-linux*) fmt=elf + fmt=elf ;; + ppc-*-linux-gnu*) fmt=elf case "$endian" in - big) targ=ppc-big ;; - *) { echo "configure: error: Linux must be configured big endian" 1>&2; exit 1; } ;; + big) ;; + *) { echo "configure: error: GNU/Linux must be configured big endian" 1>&2; exit 1; } ;; esac ;; ppc-*-solaris*) fmt=elf - case "$endian" in - big) { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; } ;; - *) targ=ppc-sol ;; - esac - ;; - ppc-*-rtems*) - fmt=elf - case "$endian" in - big) targ=ppc-big ;; - *) targ=ppc-lit ;; - esac + if test ${this_target} = $target; then + cat >> confdefs.h <<\EOF +#define TARGET_SOLARIS_COMMENT 1 +EOF + + fi + if test x${endian} = xbig; then + { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; } + fi ;; + ppc-*-rtems*) fmt=elf ;; ppc-*-macos* | ppc-*-mpw*) fmt=coff em=macos ;; ppc-*-netware*) fmt=elf em=ppcnw ;; sh-*-elf*) fmt=elf ;; sh-*-coff*) fmt=coff ;; + sh-*-rtems*) fmt=coff ;; ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;; ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;; @@ -952,7 +1606,7 @@ for this_target in $target $canon_targets ; do fmt=aout em=sparcaout ;; sparc-*-coff) fmt=coff ;; sparc-*-linux*aout*) fmt=aout em=linux ;; - sparc-*-linux*) fmt=elf em=linux ;; + sparc-*-linux-gnu*) fmt=elf em=linux ;; sparc-*-lynxos*) fmt=coff em=lynx ;; sparc-fujitsu-none) fmt=aout ;; sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*) @@ -960,6 +1614,12 @@ for this_target in $target $canon_targets ; do sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; sparc-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; + tic30-*-*aout*) fmt=aout bfd_gas=yes ;; + tic30-*-*coff*) fmt=coff bfd_gas=yes ;; + + + v850-*-*) fmt=elf bfd_gas=yes ;; + vax-*-bsd* | vax-*-ultrix*) fmt=aout ;; vax-*-vms) fmt=vms ;; @@ -986,7 +1646,7 @@ for this_target in $target $canon_targets ; do esac case ${cpu_type}-${fmt} in - alpha-*) bfd_gas=yes ;; + alpha*-*) bfd_gas=yes ;; arm-*) bfd_gas=yes ;; # not yet # i386-aout) bfd_gas=preferred ;; @@ -1004,10 +1664,16 @@ for this_target in $target $canon_targets ; do # do we need the opcodes library? case ${cpu_type} in - vax | i386) + vax | i386 | tic30) ;; *) need_opcodes=yes + + case "${enable_shared}" in + yes) shared_opcodes=true ;; + *opcodes*) shared_opcodes=true ;; + *) shared_opcodes=false ;; + esac if test "${shared_opcodes}" = "true"; then # A shared libopcodes must be linked against libbfd. need_bfd=yes @@ -1015,18 +1681,6 @@ for this_target in $target $canon_targets ; do ;; esac - test -n "$want_sparc_v9" && cat >> confdefs.h <<\EOF -#define SPARC_V9 1 -EOF - - - case ${cpu}-${vendor}-${os} in - sparc64-*-elf*) cat >> confdefs.h <<\EOF -#define SPARC_ARCH64 1 -EOF - ;; - esac - case ${cpu_type} in m32r) case ${extra_objects} in @@ -1064,6 +1718,15 @@ EOF fi ;; + sparc) + if test $this_target = $target ; then + cat >> confdefs.h <<EOF +#define DEFAULT_ARCH "${arch}" +EOF + + fi + ;; + *) ;; esac @@ -1073,7 +1736,6 @@ EOF if test $this_target = $target ; then primary_bfd_gas=$bfd_gas obj_format=$fmt - gas_target=$targ te_file=$em if test $bfd_gas = no ; then @@ -1089,7 +1751,7 @@ EOF case ${generic_target}-${fmt} in mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; - mips-*-linux*-*) case "$endian" in + mips-*-linux-gnu*-*) case "$endian" in big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;; esac ;; @@ -1133,14 +1795,6 @@ if test ! -r ${srcdir}/config/obj-${obj_format}.c; then { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; } fi -# and target makefile frag - -target_frag=${srcdir}/config/${gas_target}.mt -if test ! -r ${target_frag}; then - target_frag=/dev/null # ick! but subst_file can't be conditionalized -fi - - case ${user_bfd_gas}-${primary_bfd_gas} in yes-yes | no-no) # We didn't override user's choice. @@ -1352,68 +2006,14 @@ esac # do we need the opcodes library? case "${need_opcodes}" in yes) - OPCODES_DEP=../opcodes/libopcodes.a - OPCODES_LIB='-L../opcodes -lopcodes' - - # We need to handle some special cases for shared libraries. - case "${host}" in - *-*-sunos*) - # On SunOS, we must link against the name we are going to install, - # not -lbfd, since SunOS does not support SONAME. - if test "${shared_opcodes}" = "true"; then - OPCODES_LIB='-L../opcodes -l`echo opcodes | sed '"'"'$(program_transform_name)'"'"'`' - fi - ;; - alpha*-*-osf*) - # On Alpha OSF/1, the native linker searches all the -L - # directories for any LIB.so files, and only then searches for any - # LIB.a files. That means that if there is an installed - # libbfd.so, but this build is not done with --enable-shared, the - # link will wind up being against the install libbfd.so rather - # than the newly built libbfd. To avoid this, we must explicitly - # link against libbfd.a when --enable-shared is not used. - if test "${shared_opcodes}" != "true"; then - OPCODES_LIB='../opcodes/libopcodes.a' - fi - ;; - esac + OPCODES_LIB=../opcodes/libopcodes.la ;; esac case "${need_bfd}" in yes) - BFDDEP=../bfd/libbfd.a - BFDLIB='-L../bfd -lbfd' + BFDLIB=../bfd/libbfd.la ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h" - - # We need to handle some special cases for shared libraries - case "${host}" in - *-*-sunos*) - # On SunOS, we must link against the name we are going to install, - # not -lbfd, since SunOS does not support SONAME. - if test "${shared_bfd}" = "true"; then - BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`' - fi - ;; - alpha*-*-osf*) - # On Alpha OSF/1, the native linker searches all the -L - # directories for any LIB.so files, and only then searches for any - # LIB.a files. That means that if there is an installed - # libbfd.so, but this build is not done with --enable-shared, the - # link will wind up being against the install libbfd.so rather - # than the newly built libbfd. To avoid this, we must explicitly - # link against libbfd.a when --enable-shared is not used. - if test "${shared_bfd}" != "true"; then - BFDLIB='../bfd/libbfd.a' - fi - ;; - esac - - if test "${commonbfdlib}" = "true"; then - # when a shared libbfd is built with --enable-commonbfdlib, - # all of libopcodes is available in libbfd.so - OPCODES_LIB= - fi ;; esac @@ -1422,8 +2022,6 @@ esac - - cat >> confdefs.h <<EOF #define TARGET_ALIAS "${target_alias}" EOF @@ -1448,7 +2046,7 @@ EOF # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1449: checking for $ac_word" >&5 +echo "configure:2049: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1477,7 +2075,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1478: checking for $ac_word" >&5 +echo "configure:2078: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1525,7 +2123,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1526: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2126: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1535,11 +2133,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <<EOF -#line 1536 "configure" +#line 2136 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1559,12 +2157,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1560: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2160: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1565: checking whether we are using GNU C" >&5 +echo "configure:2165: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1573,7 +2171,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1588,7 +2186,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1589: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2189: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1615,69 +2213,120 @@ else test "${CFLAGS+set}" = set || CFLAGS="-g" fi -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# ./install, which can be erroneously created by make from ./install.sh. -echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1627: checking for a BSD compatible install" >&5 -if test -z "$INSTALL"; then -if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then + +for ac_prog in 'bison -y' byacc +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2222: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do - # Account for people who put trailing slashes in PATH elements. - case "$ac_dir/" in - /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do - if test -f $ac_dir/$ac_prog; then - if test $ac_prog = install && - grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. - : - else - ac_cv_path_install="$ac_dir/$ac_prog -c" - break 2 - fi - fi - done - ;; - esac + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_YACC="$ac_prog" + break + fi done - IFS="$ac_save_IFS" + IFS="$ac_save_ifs" +fi +fi +YACC="$ac_cv_prog_YACC" +if test -n "$YACC"; then + echo "$ac_t""$YACC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi +test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + +# Extract the first word of "flex", so it can be a program name with args. +set dummy flex; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:2254: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$LEX"; then + ac_cv_prog_LEX="$LEX" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_LEX="flex" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex" fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL="$ac_cv_path_install" - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL="$ac_install_sh" - fi fi -echo "$ac_t""$INSTALL" 1>&6 +LEX="$ac_cv_prog_LEX" +if test -n "$LEX"; then + echo "$ac_t""$LEX" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +if test -z "$LEXLIB" +then + case "$LEX" in + flex*) ac_lib=fl ;; + *) ac_lib=l ;; + esac + echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 +echo "configure:2287: checking for yywrap in -l$ac_lib" >&5 +ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-l$ac_lib $LIBS" +cat > conftest.$ac_ext <<EOF +#line 2295 "configure" +#include "confdefs.h" +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char yywrap(); -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +int main() { +yywrap() +; return 0; } +EOF +if { (eval echo configure:2306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + LEXLIB="-l$ac_lib" +else + echo "$ac_t""no" 1>&6 +fi + +fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1678: checking how to run the C preprocessor" >&5 +echo "configure:2329: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1692,13 +2341,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 1693 "configure" +#line 2344 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1709,13 +2358,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 1710 "configure" +#line 2361 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1737,21 +2386,187 @@ else fi echo "$ac_t""$CPP" 1>&6 +echo $ac_n "checking lex output file root""... $ac_c" 1>&6 +echo "configure:2390: checking lex output file root" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # The minimal lex program is just a single line: %%. But some broken lexes +# (Solaris, I think it was) want two %% lines, so accommodate them. +echo '%% +%%' | $LEX +if test -f lex.yy.c; then + ac_cv_prog_lex_root=lex.yy +elif test -f lexyy.c; then + ac_cv_prog_lex_root=lexyy +else + { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; } +fi +fi + +echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 +LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root + +echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 +echo "configure:2411: checking whether yytext is a pointer" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # POSIX says lex can declare yytext either as a pointer or an array; the +# default is implementation-dependent. Figure out which it is, since +# not all implementations provide the %pointer and %array declarations. +ac_cv_prog_lex_yytext_pointer=no +echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c +ac_save_LIBS="$LIBS" +LIBS="$LIBS $LEXLIB" +cat > conftest.$ac_ext <<EOF +#line 2423 "configure" +#include "confdefs.h" +`cat $LEX_OUTPUT_ROOT.c` +int main() { + +; return 0; } +EOF +if { (eval echo configure:2430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + ac_cv_prog_lex_yytext_pointer=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +LIBS="$ac_save_LIBS" +rm -f "${LEX_OUTPUT_ROOT}.c" + +fi + +echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6 +if test $ac_cv_prog_lex_yytext_pointer = yes; then + cat >> confdefs.h <<\EOF +#define YYTEXT_POINTER 1 +EOF + +fi + + +echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 +echo "configure:2453: checking whether to enable maintainer-specific portions of Makefiles" >&5 + # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval="$enable_maintainer_mode" + USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 + if test $USE_MAINTAINER_MODE = yes; then + MAINT= + else + MAINT='#M#' + fi + + +echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 +echo "configure:2471: checking for Cygwin32 environment" >&5 +if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2476 "configure" +#include "confdefs.h" + +int main() { +return __CYGWIN32__; +; return 0; } +EOF +if { (eval echo configure:2483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + am_cv_cygwin32=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + am_cv_cygwin32=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$am_cv_cygwin32" 1>&6 +CYGWIN32= +test "$am_cv_cygwin32" = yes && CYGWIN32=yes +echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 +echo "configure:2500: checking for Mingw32 environment" >&5 +if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 2505 "configure" +#include "confdefs.h" + +int main() { +return __MINGW32__; +; return 0; } +EOF +if { (eval echo configure:2512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + am_cv_mingw32=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + am_cv_mingw32=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$am_cv_mingw32" 1>&6 +MINGW32= +test "$am_cv_mingw32" = yes && MINGW32=yes + + +echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +echo "configure:2531: checking for executable suffix" >&5 +if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then +am_cv_exeext=.exe +else +cat > am_c_test.c << 'EOF' +int main() { +/* Nothing needed here */ +} +EOF +${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5 +am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//` +rm -f am_c_test* +fi + +test x"${am_cv_exeext}" = x && am_cv_exeext=no +fi +EXEEXT="" +test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext} +echo "$ac_t""${am_cv_exeext}" 1>&6 + + for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1742: checking for $ac_hdr" >&5 +echo "configure:2559: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1747 "configure" +#line 2564 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1781,7 +2596,7 @@ done # Put this here so that autoconf's "cross-compiling" message doesn't confuse # people who are not cross-compiling but are compiling cross-assemblers. echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6 -echo "configure:1782: checking whether compiling a cross-assembler" >&5 +echo "configure:2599: checking whether compiling a cross-assembler" >&5 if test "${host}" = "${target}"; then cross_gas=no else @@ -1796,19 +2611,19 @@ echo "$ac_t""$cross_gas" 1>&6 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:1797: checking for working alloca.h" >&5 +echo "configure:2614: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1802 "configure" +#line 2619 "configure" #include "confdefs.h" #include <alloca.h> int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:1809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -1829,12 +2644,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:1830: checking for alloca" >&5 +echo "configure:2647: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1835 "configure" +#line 2652 "configure" #include "confdefs.h" #ifdef __GNUC__ @@ -1857,7 +2672,7 @@ int main() { char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:1858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -1889,12 +2704,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:1890: checking whether alloca needs Cray hooks" >&5 +echo "configure:2707: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1895 "configure" +#line 2712 "configure" #include "confdefs.h" #if defined(CRAY) && ! defined(CRAY2) webecray @@ -1919,12 +2734,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1920: checking for $ac_func" >&5 +echo "configure:2737: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1925 "configure" +#line 2742 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1947,7 +2762,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1974,7 +2789,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:1975: checking stack direction for C alloca" >&5 +echo "configure:2792: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1982,7 +2797,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <<EOF -#line 1983 "configure" +#line 2800 "configure" #include "confdefs.h" find_stack_direction () { @@ -2001,7 +2816,7 @@ main () exit (find_stack_direction() < 0); } EOF -if { (eval echo configure:2002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2023,21 +2838,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2024: checking for inline" >&5 +echo "configure:2841: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 2031 "configure" +#line 2848 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:2038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2067,12 +2882,12 @@ esac for ac_func in unlink remove do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2068: checking for $ac_func" >&5 +echo "configure:2885: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2073 "configure" +#line 2890 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2095,7 +2910,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2124,12 +2939,12 @@ done for ac_func in sbrk do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2125: checking for $ac_func" >&5 +echo "configure:2942: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2130 "configure" +#line 2947 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2152,7 +2967,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2181,12 +2996,12 @@ done # enough, but on some of those systems, the assert macro relies on requoting # working properly! echo $ac_n "checking for working assert macro""... $ac_c" 1>&6 -echo "configure:2182: checking for working assert macro" >&5 +echo "configure:2999: checking for working assert macro" >&5 if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2187 "configure" +#line 3004 "configure" #include "confdefs.h" #include <assert.h> #include <stdio.h> @@ -2202,7 +3017,7 @@ assert (a == b ; return 0; } EOF -if { (eval echo configure:2203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* gas_cv_assert_ok=yes else @@ -2243,12 +3058,12 @@ gas_test_headers=" " echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6 -echo "configure:2244: checking whether declaration is required for strstr" >&5 +echo "configure:3061: checking whether declaration is required for strstr" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2249 "configure" +#line 3066 "configure" #include "confdefs.h" $gas_test_headers int main() { @@ -2259,7 +3074,7 @@ x = (f) strstr; ; return 0; } EOF -if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* gas_cv_decl_needed_strstr=no else @@ -2280,12 +3095,12 @@ EOF echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6 -echo "configure:2281: checking whether declaration is required for malloc" >&5 +echo "configure:3098: checking whether declaration is required for malloc" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2286 "configure" +#line 3103 "configure" #include "confdefs.h" $gas_test_headers int main() { @@ -2296,7 +3111,7 @@ x = (f) malloc; ; return 0; } EOF -if { (eval echo configure:2297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* gas_cv_decl_needed_malloc=no else @@ -2317,12 +3132,12 @@ EOF echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6 -echo "configure:2318: checking whether declaration is required for free" >&5 +echo "configure:3135: checking whether declaration is required for free" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2323 "configure" +#line 3140 "configure" #include "confdefs.h" $gas_test_headers int main() { @@ -2333,7 +3148,7 @@ x = (f) free; ; return 0; } EOF -if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* gas_cv_decl_needed_free=no else @@ -2354,12 +3169,12 @@ EOF echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6 -echo "configure:2355: checking whether declaration is required for sbrk" >&5 +echo "configure:3172: checking whether declaration is required for sbrk" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2360 "configure" +#line 3177 "configure" #include "confdefs.h" $gas_test_headers int main() { @@ -2370,7 +3185,7 @@ x = (f) sbrk; ; return 0; } EOF -if { (eval echo configure:2371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* gas_cv_decl_needed_sbrk=no else @@ -2394,12 +3209,12 @@ EOF # for it? echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6 -echo "configure:2395: checking whether declaration is required for errno" >&5 +echo "configure:3212: checking whether declaration is required for errno" >&5 if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2400 "configure" +#line 3217 "configure" #include "confdefs.h" #ifdef HAVE_ERRNO_H @@ -2414,7 +3229,7 @@ x = (f) errno; ; return 0; } EOF -if { (eval echo configure:2415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* gas_cv_decl_needed_errno=no else @@ -2434,58 +3249,6 @@ EOF } -HLDFLAGS= -HLDENV= -RPATH_ENVVAR=LD_LIBRARY_PATH -# If we have shared libraries, try to set rpath reasonably. -if test "${shared}" = "true"; then - case "${host}" in - *-*-hpux*) - HLDFLAGS='-Wl,+s,+b,$(libdir)' - RPATH_ENVVAR=SHLIB_PATH - ;; - *-*-irix5* | *-*-irix6*) - HLDFLAGS='-Wl,-rpath,$(libdir)' - ;; - *-*-linux*aout*) - ;; - *-*-linux*) - HLDFLAGS='-Wl,-rpath,$(libdir)' - ;; - *-*-solaris*) - HLDFLAGS='-R $(libdir)' - ;; - *-*-sysv4*) - HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;' - ;; - esac -fi - -# On SunOS, if the linker supports the -rpath option, use it to -# prevent ../bfd and ../opcodes from being included in the run time -# search path. -case "${host}" in - *-*-sunos*) - echo 'main () { }' > conftest.c - ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t - if grep 'unrecognized' conftest.t >/dev/null 2>&1; then - : - elif grep 'No such file' conftest.t >/dev/null 2>&1; then - : - elif grep 'do not mix' conftest.t >/dev/null 2>&1; then - : - elif test "${shared}" = "true"; then - HLDFLAGS='-Wl,-rpath=$(libdir)' - else - HLDFLAGS='-Wl,-rpath=' - fi - rm -f conftest.t conftest.c conftest - ;; -esac - - - - trap '' 1 2 15 @@ -2511,7 +3274,7 @@ EOF # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | - case `(ac_space=' '; set) 2>&1` in + case `(ac_space=' '; set) 2>&1 | grep ac_space` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). @@ -2578,7 +3341,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" + echo "$CONFIG_STATUS generated by autoconf version 2.12.1" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -2589,7 +3352,7 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in conf" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "Makefile doc/Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <<EOF @@ -2598,6 +3361,7 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF $ac_vpsub $extrasub +s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g @@ -2634,26 +3398,39 @@ s%@build_alias@%$build_alias%g s%@build_cpu@%$build_cpu%g s%@build_vendor@%$build_vendor%g s%@build_os@%$build_os%g -/@target_frag@/r $target_frag -s%@target_frag@%%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g +s%@PACKAGE@%$PACKAGE%g +s%@VERSION@%$VERSION%g +s%@ACLOCAL@%$ACLOCAL%g +s%@AUTOCONF@%$AUTOCONF%g +s%@AUTOMAKE@%$AUTOMAKE%g +s%@AUTOHEADER@%$AUTOHEADER%g +s%@MAKEINFO@%$MAKEINFO%g +s%@SET_MAKE@%$SET_MAKE%g +s%@RANLIB@%$RANLIB%g +s%@CC@%$CC%g +s%@LD@%$LD%g +s%@NM@%$NM%g +s%@LN_S@%$LN_S%g +s%@LIBTOOL@%$LIBTOOL%g s%@extra_objects@%$extra_objects%g s%@target_cpu_type@%$target_cpu_type%g s%@obj_format@%$obj_format%g s%@te_file@%$te_file%g s%@atof@%$atof%g -s%@BFDDEP@%$BFDDEP%g s%@BFDLIB@%$BFDLIB%g -s%@OPCODES_DEP@%$OPCODES_DEP%g s%@OPCODES_LIB@%$OPCODES_LIB%g s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g -s%@CC@%$CC%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@YACC@%$YACC%g +s%@LEX@%$LEX%g +s%@LEXLIB@%$LEXLIB%g s%@CPP@%$CPP%g +s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g +s%@MAINT@%$MAINT%g +s%@EXEEXT@%$EXEEXT%g s%@ALLOCA@%$ALLOCA%g -s%@HLDFLAGS@%$HLDFLAGS%g -s%@HLDENV@%$HLDENV%g -s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g CEOF EOF @@ -2776,7 +3553,7 @@ ac_eD='%g' if test "${CONFIG_HEADERS+set}" != set; then EOF cat >> $CONFIG_STATUS <<EOF - CONFIG_HEADERS="conf" + CONFIG_HEADERS="config.h:config.in" EOF cat >> $CONFIG_STATUS <<\EOF fi @@ -2863,11 +3640,13 @@ fi; done EOF cat >> $CONFIG_STATUS <<EOF + target_cpu_type=${target_cpu_type} obj_format=${obj_format} te_file=${te_file} EOF cat >> $CONFIG_STATUS <<\EOF +test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h diff --git a/contrib/binutils/gas/configure.in b/contrib/binutils/gas/configure.in index 9431028..47589db 100644 --- a/contrib/binutils/gas/configure.in +++ b/contrib/binutils/gas/configure.in @@ -4,9 +4,16 @@ dnl And be careful when changing it! If you must add tests with square dnl brackets, be sure changequote invocations surround it. dnl dnl -AC_PREREQ(2.5)dnl v2.5 needed for --bindir et al -AC_INIT(as.h)dnl -dnl +dnl v2.5 needed for --bindir et al +AC_PREREQ(2.5) +AC_INIT(as.h) + +AC_CANONICAL_SYSTEM + +AM_INIT_AUTOMAKE(gas, 2.9.1) + +AM_PROG_LIBTOOL + user_bfd_gas= AC_ARG_ENABLE(bfd-assembler, [ --enable-bfd-assembler use BFD back end for writing object files], @@ -23,17 +30,6 @@ AC_ARG_ENABLE(targets, no) enable_targets= ;; *) enable_targets=$enableval ;; esac])dnl -AC_ARG_ENABLE(shared, -[ --enable-shared build shared BFD library], -[case "${enableval}" in - yes) shared=true shared_bfd=true shared_opcodes=true ;; - no) shared=false ;; - *bfd*opcodes*) shared=true shared_bfd=true shared_opcodes=true ;; - *opcodes*bfd*) shared=true shared_bfd=true shared_opcodes=true ;; - *bfd*) shared=true shared_bfd=true ;; - *opcodes*) shared=true shared_opcodes=true ;; - *) shared=false ;; -esac])dnl AC_ARG_ENABLE(commonbfdlib, [ --enable-commonbfdlib build shared BFD/opcodes/libiberty library], [case "${enableval}" in @@ -42,13 +38,8 @@ AC_ARG_ENABLE(commonbfdlib, *) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;; esac])dnl -# Generate a header file -- gets more post-processing by Makefile later. -AC_CONFIG_HEADER(conf) - -dnl For recursion to work right, this must be an absolute pathname. -AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..) -AC_CANONICAL_SYSTEM -AC_ARG_PROGRAM +# Generate a header file +AM_CONFIG_HEADER(config.h:config.in) te_file=generic @@ -75,9 +66,13 @@ changequote(,)dnl changequote([,])dnl # check for architecture variants + arch= + endian= case ${cpu} in + alpha*) cpu_type=alpha ;; armeb) cpu_type=arm endian=big ;; arm*) cpu_type=arm endian=little ;; + thumb*) cpu_type=arm endian=little ;; hppa*) cpu_type=hppa ;; changequote(,)dnl i[456]86) cpu_type=i386 ;; @@ -91,18 +86,25 @@ changequote([,])dnl powerpcle*) cpu_type=ppc endian=little ;; powerpc*) cpu_type=ppc endian=big ;; rs6000*) cpu_type=ppc ;; - sparc64) cpu_type=sparc want_sparc_v9=true ;; - sparc*) cpu_type=sparc ;; + sparclite*) cpu_type=sparc arch=sparclite ;; + sparclet*) cpu_type=sparc arch=sparclet ;; + sparc64*) cpu_type=sparc arch=v9-64 ;; + sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c. + v850*) cpu_type=v850 ;; *) cpu_type=${cpu} ;; esac if test ${this_target} = $target ; then target_cpu_type=${cpu_type} + if test x${endian} = xbig; then + AC_DEFINE(TARGET_BYTES_BIG_ENDIAN, 1) + elif test x${endian} = xlittle; then + AC_DEFINE(TARGET_BYTES_BIG_ENDIAN, 0) + fi elif test ${target_cpu_type} != ${cpu_type} ; then continue fi - targ=${cpu_type} generic_target=${cpu_type}-$vendor-$os dev=no bfd_gas=no @@ -110,30 +112,27 @@ changequote([,])dnl # assign object format case ${generic_target} in - a29k-*-coff) fmt=coff targ=ebmon29k ;; - a29k-amd-udi) fmt=coff targ=ebmon29k ;; - a29k-amd-ebmon) fmt=coff targ=ebmon29k ;; - a29k-nyu-sym1) fmt=coff targ=ebmon29k ;; + a29k-*-coff) fmt=coff ;; + a29k-amd-udi) fmt=coff ;; + a29k-amd-ebmon) fmt=coff ;; + a29k-nyu-sym1) fmt=coff ;; a29k-*-vxworks*) fmt=coff ;; - alpha-*-*vms*) fmt=evax ;; - alpha-*-netware*) fmt=ecoff ;; - alpha-*-openbsd*) fmt=ecoff ;; - alpha-*-osf*) fmt=ecoff ;; - alpha-*-linuxecoff*) fmt=ecoff ;; - alpha-*-linux*) fmt=elf em=linux ;; + alpha*-*-*vms*) fmt=evax ;; + alpha*-*-netware*) fmt=ecoff ;; + alpha*-*-openbsd*) fmt=ecoff ;; + alpha*-*-osf*) fmt=ecoff ;; + alpha*-*-linuxecoff*) fmt=ecoff ;; + alpha*-*-linux-gnu*) fmt=elf em=linux ;; + alpha*-*-netbsd*) fmt=elf em=nbsd ;; + arc-*-elf*) fmt=elf bfd_gas=yes ;; - arm-*-riscix*) fmt=aout targ=arm-lit em=riscix ;; - arm-*-aout) fmt=aout - case "$endian" in - big) targ=arm-big ;; - *) targ=arm-lit ;; - esac - ;; - arm-*-coff) fmt=coff ;; + arm-*-riscix*) fmt=aout em=riscix ;; + arm-*-aout) fmt=aout ;; + arm-*-coff | thumb-*-coff) fmt=coff ;; arm-*-riscix*) fmt=aout ;; - arm-*-pe) fmt=coff targ=armcoff em=pe ;; + arm-*-pe | thumb-*-pe) fmt=coff em=pe ;; d10v-*-*) fmt=elf bfd_gas=yes ;; @@ -147,142 +146,122 @@ changequote([,])dnl h8300-*-coff) fmt=coff ;; - i386-ibm-aix*) fmt=coff targ=i386coff - em=i386aix ;; + i386-ibm-aix*) fmt=coff em=i386aix ;; i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;; i386-*-bsd*) fmt=aout em=386bsd ;; i386-*-netbsd0.8) fmt=aout em=386bsd ;; i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;; i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;; i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;; - i386-*-linux*coff*) fmt=coff em=linux - targ=i386coff ;; - i386-*-linux*) fmt=elf em=linux ;; - i386-*-lynxos*) fmt=coff targ=i386coff - em=lynx ;; + i386-*-linux*coff*) fmt=coff em=linux ;; + i386-*-linux-gnu*) fmt=elf em=linux ;; + i386-*-lynxos*) fmt=coff em=lynx ;; i386-*-sysv4* | i386-*-solaris* | i386-*-elf) fmt=elf ;; - i386-*-freebsdelf*) fmt=elf em=freebsd ;; + i386-*-freebsdelf*) fmt=elf em=freebsd;; i386-*-freebsd*) fmt=aout em=freebsd bfd_gas=yes ;; - i386-*-sco*elf*) fmt=elf targ=sco5 ;; - i386-*-coff | i386-*-sysv* | i386-*-sco* | i386-*-isc*) - fmt=coff targ=i386coff ;; + i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*) + fmt=coff ;; + i386-*-sco3.2v5*) fmt=elf + if test ${this_target} = $target; then + AC_DEFINE(SCO_ELF) + fi + ;; + i386-*-sco3.2*) fmt=coff ;; i386-*-vsta) fmt=aout ;; - i386-*-go32) fmt=coff targ=i386coff ;; - i386-*-rtems*) fmt=coff targ=i386coff ;; + i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*) + fmt=coff em=go32;; + i386-*-rtems*) fmt=coff ;; i386-*-gnu*) fmt=elf ;; i386-*-mach*) fmt=aout em=mach bfd_gas=yes ;; i386-*-msdos*) fmt=aout ;; i386-*-moss*) fmt=elf ;; - i386-*-pe) fmt=coff targ=i386coff em=pe ;; - i386-*-cygwin32) fmt=coff targ=i386coff em=pe ;; - i386-*-*nt) fmt=coff targ=i386coff em=pe ;; + i386-*-pe) fmt=coff em=pe ;; + i386-*-cygwin32*) fmt=coff em=pe bfd_gas=yes ;; + i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;; + i386-*-*nt*) fmt=coff em=pe ;; i960-*-bout) fmt=bout ;; - i960-*-coff) fmt=coff em=ic960 targ=ic960coff ;; - i960-*-rtems*) fmt=coff em=ic960 targ=ic960coff ;; + i960-*-coff) fmt=coff em=ic960 ;; + i960-*-rtems*) fmt=coff em=ic960 ;; i960-*-nindy*) fmt=bout ;; i960-*-vxworks4*) fmt=bout ;; i960-*-vxworks5.0) fmt=bout ;; - i960-*-vxworks5.*) fmt=coff em=ic960 targ=ic960coff ;; + i960-*-vxworks5.*) fmt=coff em=ic960 ;; i960-*-vxworks*) fmt=bout ;; m32r-*-*) fmt=elf bfd_gas=yes ;; m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*) fmt=aout em=sun3 ;; - m68k-motorola-sysv*) fmt=coff targ=m68kcoff em=delta ;; - m68k-bull-sysv3*) fmt=coff targ=m68kcoff em=dpx2 ;; - m68k-apollo-*) fmt=coff targ=apollo em=apollo ;; + m68k-motorola-sysv*) fmt=coff em=delta ;; + m68k-bull-sysv3*) fmt=coff em=dpx2 ;; + m68k-apollo-*) fmt=coff em=apollo ;; m68k-*-sysv4*) # must be before -sysv* fmt=elf em=svr4 ;; m68k-*-elf*) fmt=elf ;; m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*) - fmt=coff targ=m68kcoff ;; + fmt=coff ;; m68k-*-hpux*) fmt=hp300 em=hp300 ;; m68k-*-linux*aout*) fmt=aout em=linux ;; - m68k-*-linux*) fmt=elf em=linux ;; - m68k-*-lynxos*) fmt=coff targ=m68kcoff - em=lynx ;; + m68k-*-linux-gnu*) fmt=elf em=linux ;; + m68k-*-lynxos*) fmt=coff em=lynx ;; m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; - m68k-apple-aux*) fmt=coff targ=m68kcoff em=aux ;; + m68k-apple-aux*) fmt=coff em=aux ;; m68k-*-psos*) fmt=elf em=psos;; - m88k-motorola-sysv3*) fmt=coff targ=m88kcoff em=delt88 ;; - m88k-*-coff*) fmt=coff targ=m88kcoff ;; + m88k-motorola-sysv3*) fmt=coff em=delt88 ;; + m88k-*-coff*) fmt=coff ;; # don't change em like *-*-bsd does - mips-dec-netbsd*) fmt=elf targ=mips-lit endian=little ;; - mips-dec-openbsd*) fmt=elf targ=mips-lit endian=little ;; - mips-dec-bsd*) fmt=aout targ=mips-lit ;; - mips-sony-bsd*) fmt=ecoff targ=mips-big ;; + mips-dec-netbsd*) fmt=elf endian=little ;; + mips-dec-openbsd*) fmt=elf endian=little ;; + mips-dec-bsd*) fmt=aout ;; + mips-sony-bsd*) fmt=ecoff ;; mips-*-bsd*) AC_MSG_ERROR(Unknown vendor for mips-bsd configuration.) ;; - mips-*-ultrix*) fmt=ecoff targ=mips-lit endian=little ;; - mips-*-osf*) fmt=ecoff targ=mips-lit endian=little ;; - mips-*-ecoff*) fmt=ecoff - case "$endian" in - big) targ=mips-big ;; - *) targ=mips-lit ;; - esac - ;; - mips-*-ecoff*) fmt=ecoff targ=mips-big ;; - mips-*-irix6*) fmt=elf targ=mips-big ;; - mips-*-irix5*) fmt=elf targ=mips-big ;; - mips-*-irix*) fmt=ecoff targ=mips-big ;; - mips-*-lnews*) fmt=ecoff targ=mips-lit em=lnews ;; - mips-*-riscos*) fmt=ecoff targ=mips-big ;; - mips-*-sysv*) fmt=ecoff targ=mips-big ;; - mips-*-elf* | mips-*-rtems* | mips-*-linux* | mips-*-gnu* | mips-*-openbsd*) - fmt=elf - case "$endian" in - big) targ=mips-big ;; - *) targ=mips-lit ;; - esac - ;; + mips-*-ultrix*) fmt=ecoff endian=little ;; + mips-*-osf*) fmt=ecoff endian=little ;; + mips-*-ecoff*) fmt=ecoff ;; + mips-*-ecoff*) fmt=ecoff ;; + mips-*-irix6*) fmt=elf ;; + mips-*-irix5*) fmt=elf ;; + mips-*-irix*) fmt=ecoff ;; + mips-*-lnews*) fmt=ecoff em=lnews ;; + mips-*-riscos*) fmt=ecoff ;; + mips-*-sysv*) fmt=ecoff ;; + mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*) + fmt=elf ;; mn10200-*-*) fmt=elf bfd_gas=yes ;; mn10300-*-*) fmt=elf bfd_gas=yes ;; ppc-*-pe | ppc-*-cygwin32 | ppc-*-winnt*) - fmt=coff em=pe - case "$endian" in - big) targ=ppc-big ;; - *) targ=ppc-lit ;; - esac - ;; + fmt=coff em=pe ;; ppc-*-aix*) fmt=coff ;; ppc-*-beos*) fmt=coff ;; ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*) - fmt=elf - case "$endian" in - big) targ=ppc-big ;; - *) targ=ppc-lit ;; - esac - ;; - ppc-*-linux*) fmt=elf + fmt=elf ;; + ppc-*-linux-gnu*) fmt=elf case "$endian" in - big) targ=ppc-big ;; - *) AC_MSG_ERROR(Linux must be configured big endian) ;; + big) ;; + *) AC_MSG_ERROR(GNU/Linux must be configured big endian) ;; esac ;; ppc-*-solaris*) fmt=elf - case "$endian" in - big) AC_MSG_ERROR(Solaris must be configured little endian) ;; - *) targ=ppc-sol ;; - esac - ;; - ppc-*-rtems*) - fmt=elf - case "$endian" in - big) targ=ppc-big ;; - *) targ=ppc-lit ;; - esac + if test ${this_target} = $target; then + AC_DEFINE(TARGET_SOLARIS_COMMENT) + fi + if test x${endian} = xbig; then + AC_MSG_ERROR(Solaris must be configured little endian) + fi ;; + ppc-*-rtems*) fmt=elf ;; ppc-*-macos* | ppc-*-mpw*) fmt=coff em=macos ;; ppc-*-netware*) fmt=elf em=ppcnw ;; sh-*-elf*) fmt=elf ;; sh-*-coff*) fmt=coff ;; + sh-*-rtems*) fmt=coff ;; ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;; ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;; @@ -294,7 +273,7 @@ changequote([,])dnl fmt=aout em=sparcaout ;; sparc-*-coff) fmt=coff ;; sparc-*-linux*aout*) fmt=aout em=linux ;; - sparc-*-linux*) fmt=elf em=linux ;; + sparc-*-linux-gnu*) fmt=elf em=linux ;; sparc-*-lynxos*) fmt=coff em=lynx ;; sparc-fujitsu-none) fmt=aout ;; sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*) @@ -302,6 +281,12 @@ changequote([,])dnl sparc-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; sparc-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; + tic30-*-*aout*) fmt=aout bfd_gas=yes ;; + tic30-*-*coff*) fmt=coff bfd_gas=yes ;; + + + v850-*-*) fmt=elf bfd_gas=yes ;; + vax-*-bsd* | vax-*-ultrix*) fmt=aout ;; vax-*-vms) fmt=vms ;; @@ -328,7 +313,7 @@ changequote([,])dnl esac case ${cpu_type}-${fmt} in - alpha-*) bfd_gas=yes ;; + alpha*-*) bfd_gas=yes ;; arm-*) bfd_gas=yes ;; # not yet # i386-aout) bfd_gas=preferred ;; @@ -346,10 +331,16 @@ changequote([,])dnl # do we need the opcodes library? case ${cpu_type} in - vax | i386) + vax | i386 | tic30) ;; *) need_opcodes=yes + + case "${enable_shared}" in + yes) shared_opcodes=true ;; + *opcodes*) shared_opcodes=true ;; + *) shared_opcodes=false ;; + esac if test "${shared_opcodes}" = "true"; then # A shared libopcodes must be linked against libbfd. need_bfd=yes @@ -357,12 +348,6 @@ changequote([,])dnl ;; esac - test -n "$want_sparc_v9" && AC_DEFINE(SPARC_V9) - - case ${cpu}-${vendor}-${os} in - sparc64-*-elf*) AC_DEFINE(SPARC_ARCH64) ;; - esac - case ${cpu_type} in m32r) case ${extra_objects} in @@ -397,6 +382,12 @@ changequote([,])dnl fi ;; + sparc) + if test $this_target = $target ; then + AC_DEFINE_UNQUOTED(DEFAULT_ARCH, "${arch}") + fi + ;; + *) ;; esac @@ -406,7 +397,6 @@ changequote([,])dnl if test $this_target = $target ; then primary_bfd_gas=$bfd_gas obj_format=$fmt - gas_target=$targ te_file=$em if test $bfd_gas = no ; then @@ -422,7 +412,7 @@ changequote([,])dnl case ${generic_target}-${fmt} in mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; - mips-*-linux*-*) case "$endian" in + mips-*-linux-gnu*-*) case "$endian" in big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;; esac ;; @@ -469,14 +459,6 @@ if test ! -r ${srcdir}/config/obj-${obj_format}.c; then AC_MSG_ERROR(GAS does not have support for object file format ${obj_format}) fi -# and target makefile frag - -target_frag=${srcdir}/config/${gas_target}.mt -if test ! -r ${target_frag}; then - target_frag=/dev/null # ick! but subst_file can't be conditionalized -fi -AC_SUBST_FILE(target_frag) - case ${user_bfd_gas}-${primary_bfd_gas} in yes-yes | no-no) # We didn't override user's choice. @@ -599,74 +581,18 @@ esac # do we need the opcodes library? case "${need_opcodes}" in yes) - OPCODES_DEP=../opcodes/libopcodes.a - OPCODES_LIB='-L../opcodes -lopcodes' - - # We need to handle some special cases for shared libraries. - case "${host}" in - *-*-sunos*) - # On SunOS, we must link against the name we are going to install, - # not -lbfd, since SunOS does not support SONAME. - if test "${shared_opcodes}" = "true"; then - OPCODES_LIB='-L../opcodes -l`echo opcodes | sed '"'"'$(program_transform_name)'"'"'`' - fi - ;; - alpha*-*-osf*) - # On Alpha OSF/1, the native linker searches all the -L - # directories for any LIB.so files, and only then searches for any - # LIB.a files. That means that if there is an installed - # libbfd.so, but this build is not done with --enable-shared, the - # link will wind up being against the install libbfd.so rather - # than the newly built libbfd. To avoid this, we must explicitly - # link against libbfd.a when --enable-shared is not used. - if test "${shared_opcodes}" != "true"; then - OPCODES_LIB='../opcodes/libopcodes.a' - fi - ;; - esac + OPCODES_LIB=../opcodes/libopcodes.la ;; esac case "${need_bfd}" in yes) - BFDDEP=../bfd/libbfd.a - BFDLIB='-L../bfd -lbfd' + BFDLIB=../bfd/libbfd.la ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h" - - # We need to handle some special cases for shared libraries - case "${host}" in - *-*-sunos*) - # On SunOS, we must link against the name we are going to install, - # not -lbfd, since SunOS does not support SONAME. - if test "${shared_bfd}" = "true"; then - BFDLIB='-L../bfd -l`echo bfd | sed '"'"'$(program_transform_name)'"'"'`' - fi - ;; - alpha*-*-osf*) - # On Alpha OSF/1, the native linker searches all the -L - # directories for any LIB.so files, and only then searches for any - # LIB.a files. That means that if there is an installed - # libbfd.so, but this build is not done with --enable-shared, the - # link will wind up being against the install libbfd.so rather - # than the newly built libbfd. To avoid this, we must explicitly - # link against libbfd.a when --enable-shared is not used. - if test "${shared_bfd}" != "true"; then - BFDLIB='../bfd/libbfd.a' - fi - ;; - esac - - if test "${commonbfdlib}" = "true"; then - # when a shared libbfd is built with --enable-commonbfdlib, - # all of libopcodes is available in libbfd.so - OPCODES_LIB= - fi ;; esac -AC_SUBST(BFDDEP) AC_SUBST(BFDLIB) -AC_SUBST(OPCODES_DEP) AC_SUBST(OPCODES_LIB) AC_SUBST(ALL_OBJ_DEPS) @@ -678,7 +604,14 @@ AC_DEFINE_UNQUOTED(TARGET_VENDOR, "${target_vendor}") AC_DEFINE_UNQUOTED(TARGET_OS, "${target_os}") AC_PROG_CC -AC_PROG_INSTALL + +AC_PROG_YACC +AC_PROG_LEX +AC_DECL_YYTEXT + +AM_MAINTAINER_MODE +AM_CYGWIN32 +AM_EXEEXT AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h) @@ -743,58 +676,6 @@ GAS_CHECK_DECL_NEEDED(errno, f, int f, [ #endif ]) -HLDFLAGS= -HLDENV= -RPATH_ENVVAR=LD_LIBRARY_PATH -# If we have shared libraries, try to set rpath reasonably. -if test "${shared}" = "true"; then - case "${host}" in - *-*-hpux*) - HLDFLAGS='-Wl,+s,+b,$(libdir)' - RPATH_ENVVAR=SHLIB_PATH - ;; - *-*-irix5* | *-*-irix6*) - HLDFLAGS='-Wl,-rpath,$(libdir)' - ;; - *-*-linux*aout*) - ;; - *-*-linux*) - HLDFLAGS='-Wl,-rpath,$(libdir)' - ;; - *-*-solaris*) - HLDFLAGS='-R $(libdir)' - ;; - *-*-sysv4*) - HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;' - ;; - esac -fi - -# On SunOS, if the linker supports the -rpath option, use it to -# prevent ../bfd and ../opcodes from being included in the run time -# search path. -case "${host}" in - *-*-sunos*) - echo 'main () { }' > conftest.c - ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t - if grep 'unrecognized' conftest.t >/dev/null 2>&1; then - : - elif grep 'No such file' conftest.t >/dev/null 2>&1; then - : - elif grep 'do not mix' conftest.t >/dev/null 2>&1; then - : - elif test "${shared}" = "true"; then - HLDFLAGS='-Wl,-rpath=$(libdir)' - else - HLDFLAGS='-Wl,-rpath=' - fi - rm -f conftest.t conftest.c conftest - ;; -esac -AC_SUBST(HLDFLAGS) -AC_SUBST(HLDENV) -AC_SUBST(RPATH_ENVVAR) - dnl This must come last. dnl We used to make symlinks to files in the source directory, but now |