From 84c8bf5340f6a3e8de85d8ef180ccfb5dd73f6db Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Mon, 20 Jun 2005 11:43:16 +0000 Subject: [PATCH] Winebuild darwin/x86-specific fixes: - Assembler interprets .align as power-of-two - Add .weak_reference to output where gcc 3.3 swallows it --- tools/winebuild/spec32.c | 1 + tools/winebuild/utils.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c index b80357b0cc1..4b57c8f0d1c 100644 --- a/tools/winebuild/spec32.c +++ b/tools/winebuild/spec32.c @@ -83,6 +83,7 @@ static void declare_weak_function( FILE *outfile, const char *ret_type, const ch fprintf( outfile, "extern %s %s(%s) __attribute__((weak_import));\n", ret_type, name, params ); fprintf( outfile, "static %s (*__wine_spec_weak_%s)(%s) = %s;\n", ret_type, name, params, name ); fprintf( outfile, "#define %s __wine_spec_weak_%s\n", name, name ); + fprintf( outfile, "asm(\".weak_reference " __ASM_NAME("%s") "\");\n", name ); fprintf( outfile, "# else\n" ); fprintf( outfile, "extern %s %s(%s) __attribute__((weak));\n", ret_type, name, params ); fprintf( outfile, "# endif\n" ); diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c index c66c8dc3a5f..e186b8b2b73 100644 --- a/tools/winebuild/utils.c +++ b/tools/winebuild/utils.c @@ -349,7 +349,7 @@ const char *make_c_identifier( const char *str ) */ int get_alignment(int alignBoundary) { -#if defined(__powerpc__) || defined(__ALPHA__) +#if defined(__powerpc__) || defined(__ALPHA__) || defined(__APPLE__) int n = 0;