Compare commits

..

6 Commits

Author SHA1 Message Date
Axel Dörfler
04bfbdfd8f * Applied patch by Christian: build fix for Cygwin.
git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@31258 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-26 16:26:50 +00:00
Oliver Tappe
0df6ed3163 * no longer complain about %z being an unknown conversion type - our printf()
is much newer than gcc-2.95.3 and does support it


git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@31179 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-22 18:18:53 +00:00
Oliver Tappe
3126d774bf * applied fix for optimization of wchar_t constants which
is mentioned in the ICU configuration for BeOS,
  since otherwise we could not use optimization for
  ICU at all.
  [see http://gcc.gnu.org/ml/gcc-patches/2000-09/msg00454.html]



git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@31054 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-14 21:07:41 +00:00
François Revol
40ef888cfd Remove USE_GAS as for other platforms since it's deprecated, as suggested by umccullough, please shout if it breaks anything.
git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@30931 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-30 19:27:42 +00:00
Jérôme Duval
093b4f688a Applied patch for arm haiku target from Johannes Wischert (bug #3633)
The cross tools build still needs the arm specific headers in Haiku to complete (bug #3763)


git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@30652 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-06 20:34:18 +00:00
Jonas Sundström
257de42932 Tweaks. Removing superflous config. Cleaner and closer to defaults, hopefully.
git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@30580 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-02 18:20:14 +00:00
7 changed files with 56 additions and 111 deletions

View File

@@ -736,8 +736,6 @@ arm*-*-netbsd*)
arm*-*-haiku*)
tmake_file="${tmake_file} t-haiku arm/t-arm arm/t-arm-elf"
tm_file="dbxelf.h elfos.h haiku.h arm/elf.h arm/aout.h arm/haiku.h arm/arm.h"
tm_defines="USE_GAS"
use_fixproto=yes
;;
arm*-*-linux*) # ARM GNU/Linux with ELF
tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
@@ -1649,7 +1647,7 @@ m68k-*-haiku*)
default_cf_cpu=5206
tmake_file="m68k/t-m68kbare m68k/t-crtstuff t-haiku" #??
tm_file="${tm_file} dbxelf.h elfos.h haiku.h m68k/haiku.h"
tm_defines="MOTOROLA USE_GAS"
tm_defines="${tm_defines} MOTOROLA=1"
;;
mcore-*-elf)
tm_file="dbxelf.h elfos.h svr4.h ${tm_file} mcore/mcore-elf.h"

View File

@@ -21,7 +21,8 @@
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (ARM Haiku/ELF)");
#undef ASM_COMMENT_START
#define ASM_COMMENT_START "@"
/* Unsigned chars produces much better code than signed. */
#define DEFAULT_SIGNED_CHAR 0

View File

@@ -20,7 +20,8 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#define TARGET_VERSION fprintf (stderr, " (mips Haiku/ELF)");
#undef TARGET_VERSION
#define TARGET_VERSION fprintf (stderr, " (MIPSEL Haiku/ELF)");
#undef SIZE_TYPE
#define SIZE_TYPE "long unsigned int"
@@ -34,15 +35,12 @@ Boston, MA 02111-1307, USA. */
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 16
/* If we don't set MASK_ABICALLS, we can't default to PIC. */
#undef TARGET_DEFAULT
#define TARGET_DEFAULT MASK_ABICALLS
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
builtin_define ("__HAIKU__"); \
builtin_define ("__MIPS__"); \
builtin_define ("__MIPSEL__"); \
builtin_define ("_MIPSEL_"); \
builtin_define ("__stdcall=__attribute__((__stdcall__))"); \
builtin_define ("__cdecl=__attribute__((__cdecl__))"); \
@@ -61,76 +59,6 @@ Boston, MA 02111-1307, USA. */
} \
while (0)
/* Provide a LINK_SPEC appropriate for Haiku. Here we provide support
for the special GCC options -static and -shared, which allow us to
link things in one of these three modes by applying the appropriate
combinations of options at link-time. */
/* If ELF is the default format, we should not use /lib/elf. */
#undef LINK_SPEC
#define LINK_SPEC "%{!o*:-o %b} -m elf_mipsel_haiku -shared -Bsymbolic %{nostart:-e 0}"
/* A C statement (sans semicolon) to output to the stdio stream
FILE the assembler definition of uninitialized global DECL named
NAME whose size is SIZE bytes and alignment is ALIGN bytes.
Try to use asm_output_aligned_bss to implement this macro. */
#define BSS_SECTION_ASM_OP "\t.section\t.bss"
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
#undef ASM_DECLARE_OBJECT_NAME
#define ASM_DECLARE_OBJECT_NAME mips_declare_object_name
#undef FUNCTION_NAME_ALREADY_DECLARED
#define FUNCTION_NAME_ALREADY_DECLARED 1
/* The glibc _mcount stub will save $v0 for us. Don't mess with saving
it, since ASM_OUTPUT_REG_PUSH/ASM_OUTPUT_REG_POP do not work in the
presence of $gp-relative calls. */
#undef ASM_OUTPUT_REG_PUSH
#undef ASM_OUTPUT_REG_POP
/* The MIPS assembler has different syntax for .set. We set it to
.dummy to trap any errors. */
#undef SET_ASM_OP
#define SET_ASM_OP "\t.dummy\t"
#undef ASM_OUTPUT_DEF
#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
do { \
fputc ( '\t', FILE); \
assemble_name (FILE, LABEL1); \
fputs ( " = ", FILE); \
assemble_name (FILE, LABEL2); \
fputc ( '\n', FILE); \
} while (0)
#undef ASM_DECLARE_FUNCTION_NAME
#define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
do { \
if (!flag_inhibit_size_directive) \
{ \
fputs ("\t.ent\t", STREAM); \
assemble_name (STREAM, NAME); \
putc ('\n', STREAM); \
} \
ASM_OUTPUT_TYPE_DIRECTIVE (STREAM, NAME, "function"); \
assemble_name (STREAM, NAME); \
fputs (":\n", STREAM); \
} while (0)
#undef ASM_DECLARE_FUNCTION_SIZE
#define ASM_DECLARE_FUNCTION_SIZE(STREAM, NAME, DECL) \
do { \
if (!flag_inhibit_size_directive) \
{ \
fputs ("\t.end\t", STREAM); \
assemble_name (STREAM, NAME); \
putc ('\n', STREAM); \
} \
} while (0)

View File

@@ -58,6 +58,10 @@
# define STRUCT_DIRENT struct dirent
# endif
# ifdef __CYGWIN__
# include <unistd.h>
# endif
# ifdef OS_COHERENT
# include <arcoff.h>
# define HAVE_AR

View File

@@ -1,5 +1,5 @@
/* Keep JAMVERSYM in sync with VERSION. */
/* It can be accessed as $(JAMVERSION) in the Jamfile. */
#define VERSION "2.5-haiku-20080327"
#define VERSION "2.5-haiku-20090626"
#define JAMVERSYM "JAMVERSION=2.5"

View File

@@ -335,7 +335,7 @@ combine_strings (strings)
TREE_STATIC (value) = 1;
return value;
}
/* To speed up processing of attributes, we maintain an array of
IDENTIFIER_NODES and the corresponding attribute types. */
@@ -396,7 +396,7 @@ init_attributes ()
add_attribute (A_NO_INSTRUMENT_FUNCTION, "no_instrument_function", 0, 0, 1);
add_attribute (A_NO_CHECK_MEMORY_USAGE, "no_check_memory_usage", 0, 0, 1);
}
/* Default implementation of valid_lang_attribute, below. By default, there
are no language-specific attributes. */
@@ -448,11 +448,11 @@ decl_attributes (node, attributes, prefix_attributes)
anything done here. */
PRAGMA_INSERT_ATTRIBUTES (node, & attributes, & prefix_attributes);
#endif
#ifdef INSERT_ATTRIBUTES
INSERT_ATTRIBUTES (node, & attributes, & prefix_attributes);
#endif
attributes = chainon (prefix_attributes, attributes);
for (a = attributes; a; a = TREE_CHAIN (a))
@@ -679,7 +679,7 @@ decl_attributes (node, attributes, prefix_attributes)
= (args ? TREE_VALUE (args)
: size_int (BIGGEST_ALIGNMENT / BITS_PER_UNIT));
int align;
/* Strip any NOPs of any kind. */
while (TREE_CODE (align_expr) == NOP_EXPR
|| TREE_CODE (align_expr) == CONVERT_EXPR
@@ -725,7 +725,7 @@ decl_attributes (node, attributes, prefix_attributes)
"argument format specified for non-function `%s'");
continue;
}
if (TREE_CODE (format_type_id) != IDENTIFIER_NODE)
{
error ("unrecognized format specifier");
@@ -734,7 +734,7 @@ decl_attributes (node, attributes, prefix_attributes)
else
{
const char *p = IDENTIFIER_POINTER (format_type_id);
if (!strcmp (p, "printf") || !strcmp (p, "__printf__"))
format_type = printf_format_type;
else if (!strcmp (p, "scanf") || !strcmp (p, "__scanf__"))
@@ -966,7 +966,7 @@ split_specs_attrs (specs_attrs, declspecs, prefix_attributes)
tree t, s, a, next, specs, attrs;
/* This can happen after an __extension__ in pedantic mode. */
if (specs_attrs != NULL_TREE
if (specs_attrs != NULL_TREE
&& TREE_CODE (specs_attrs) == INTEGER_CST)
{
*declspecs = NULL_TREE;
@@ -1050,7 +1050,7 @@ strip_attrs (specs_attrs)
return specs;
}
/* Check a printf/fprintf/sprintf/scanf/fscanf/sscanf format against
a parameter list. */
@@ -1091,7 +1091,7 @@ typedef struct {
/* Type of argument if length modifier `L' is used.
If NULL, then this modifier is not allowed. */
tree *bigllen;
/* Type of argument if length modifier `Z' is used.
/* Type of argument if length modifier `Z' or 'z' is used.
If NULL, then this modifier is not allowed. */
tree *zlen;
/* List of other modifier characters allowed with these options. */
@@ -1300,7 +1300,7 @@ tfaff ()
{
warning ("too few arguments for format");
}
/* Check the argument list of a call to printf, scanf, etc.
NAME is the function identifier.
ASSEMBLER_NAME is the function's assembler identifier.
@@ -1648,6 +1648,12 @@ check_format_info (info, params)
if (pedantic)
warning ("ANSI C does not support the `Z' length modifier");
}
else if (*format_chars == 'z')
{
length_char = *format_chars++;
if (pedantic)
warning ("ANSI C does not support the `z' length modifier");
}
else
length_char = 0;
if (length_char == 'l' && *format_chars == 'l')
@@ -1791,6 +1797,7 @@ check_format_info (info, params)
case 'q': wanted_type = fci->qlen ? *(fci->qlen) : 0; break;
case 'L': wanted_type = fci->bigllen ? *(fci->bigllen) : 0; break;
case 'Z': wanted_type = fci->zlen ? *fci->zlen : 0; break;
case 'z': wanted_type = fci->zlen ? *fci->zlen : 0; break;
}
if (wanted_type == 0)
warning ("use of `%c' length character with `%c' type character",
@@ -1914,7 +1921,7 @@ check_format_info (info, params)
}
}
}
/* Print a warning if a constant expression had overflow in folding.
Invoke this function on every expression that the language
requires to be a constant expression.
@@ -2021,7 +2028,7 @@ convert_and_check (type, expr)
}
return t;
}
void
c_expand_expr_stmt (expr)
tree expr;
@@ -2039,7 +2046,7 @@ c_expand_expr_stmt (expr)
expand_expr_stmt (expr);
}
/* Validate the expression after `case' and apply default promotions. */
tree
@@ -2066,7 +2073,7 @@ check_case_value (value)
return value;
}
/* Return an integer type with BITS bits of precision,
that is unsigned if UNSIGNEDP is nonzero, otherwise signed. */
@@ -2164,7 +2171,7 @@ type_for_mode (mode, unsignedp)
return 0;
}
/* Return the minimum number of bits needed to represent VALUE in a
signed or unsigned type, UNSIGNEDP says which. */
@@ -2195,7 +2202,7 @@ min_precision (value, unsignedp)
return log + 1 + ! unsignedp;
}
/* Print an error message for invalid operands to arith operation CODE.
NOP_EXPR is used as a special case (see truthvalue_conversion). */
@@ -2261,7 +2268,7 @@ binary_op_error (code)
}
error ("invalid operands to binary %s", opname);
}
/* Subroutine of build_binary_op, used for comparison operations.
See if the operands have both been converted from subword integer types
and, if so, perhaps change them both back to their original type.
@@ -2606,7 +2613,7 @@ shorten_compare (op0_ptr, op1_ptr, restype_ptr, rescode_ptr)
return 0;
}
/* Prepare expr to be an argument of a TRUTH_NOT_EXPR,
or validate its data type for an `if' or `while' statement or ?..: exp.
@@ -2791,7 +2798,7 @@ truthvalue_conversion (expr)
return build_binary_op (NE_EXPR, expr, integer_zero_node, 1);
}
#if USE_CPPLIB
/* Read the rest of a #-directive from input stream FINPUT.
In normal use, the directive name and the white space after it
@@ -2974,7 +2981,7 @@ get_directive_line (finput)
}
}
#endif /* !USE_CPPLIB */
/* Make a variant type in the proper way for C/C++, propagating qualifiers
down to the element type of an array. */
@@ -3035,9 +3042,9 @@ c_apply_type_quals_to_decl (type_quals, decl)
alias set for the type pointed to by the type of the
decl. */
int pointed_to_alias_set
int pointed_to_alias_set
= get_alias_set (TREE_TYPE (TREE_TYPE (decl)));
if (!pointed_to_alias_set)
/* It's not legal to make a subset of alias set zero. */
;
@@ -3071,7 +3078,7 @@ c_find_base_decl (t)
decl = NULL_TREE;
if (TREE_CODE (t) == FIELD_DECL
if (TREE_CODE (t) == FIELD_DECL
|| TREE_CODE (t) == PARM_DECL
|| TREE_CODE (t) == VAR_DECL)
/* Aha, we found a pointer-typed declaration. */
@@ -3167,7 +3174,7 @@ c_get_alias_set (t)
&& DECL_BIT_FIELD_TYPE (TREE_OPERAND (t, 1)))
/* Since build_modify_expr calls get_unwidened for stores to
component references, the type of a bit field can be changed
from (say) `unsigned int : 16' to `unsigned short' or from
from (say) `unsigned int : 16' to `unsigned short' or from
`enum E : 16' to `short'. We want the real type of the
bit-field in this case, not some the integral equivalent. */
type = DECL_BIT_FIELD_TYPE (TREE_OPERAND (t, 1));
@@ -3204,7 +3211,7 @@ c_get_alias_set (t)
else if (TREE_CODE (type) == FUNCTION_TYPE)
/* There are no objects of FUNCTION_TYPE, so there's no point in
using up an alias set for them. (There are, of course,
pointers and references to functions, but that's
pointers and references to functions, but that's
different.) */
TYPE_ALIAS_SET (type) = 0;
else if (TREE_CODE (type) == RECORD_TYPE
@@ -3224,7 +3231,7 @@ c_get_alias_set (t)
In particular, if we have `typedef int I', then `int *', and
`I *' are different types. So, we have to pick a canonical
representative. We do this below.
Technically, this approach is actually more conservative that
it needs to be. In particular, `const int *' and `int *'
chould be in different alias sets, according to the C and C++
@@ -3250,7 +3257,7 @@ c_get_alias_set (t)
TYPE_ALIAS_SET (type) = c_get_alias_set (t);
}
if (!TYPE_ALIAS_SET_KNOWN_P (type))
if (!TYPE_ALIAS_SET_KNOWN_P (type))
{
/* Types that are not allocated on the permanent obstack are not
placed in the type hash table. Thus, there can be multiple

View File

@@ -6448,9 +6448,16 @@ expand_expr (exp, target, tmode, modifier)
&& TREE_INT_CST_HIGH (index) == 0
&& (TREE_INT_CST_LOW (index)
< TREE_STRING_LENGTH (init)))
return (GEN_INT
(TREE_STRING_POINTER
(init)[TREE_INT_CST_LOW (index)]));
{
tree type = TREE_TYPE (TREE_TYPE (init));
enum machine_mode mode = TYPE_MODE (type);
if (GET_MODE_CLASS (mode) == MODE_INT
&& GET_MODE_SIZE (mode) == 1)
return (GEN_INT
(TREE_STRING_POINTER
(init)[TREE_INT_CST_LOW (index)]));
}
}
}
}