Ticket #2121: clean-arm-support.diff

File clean-arm-support.diff, 3.6 KB (added by Josh, 11 years ago)

Fix windows build and remove extraneous flags.

  • build/premake/premake4.lua

     
    283283            end
    284284
    285285            if arch == "arm" then
    286                 -- disable warnings about va_list ABI change
     286                -- disable warnings about va_list ABI change and use
     287                -- compile-time flags for futher configuration.
    287288                buildoptions { "-Wno-psabi" }
    288289                if _OPTIONS["android"] then
    289                     -- target generic arm CPUs with NEON
    290                     buildoptions { "-mtune=generic-arm -mfpu=neon -mfloat-abi=softfp" }
    291                 else
    292                     -- target Cortex-A15 CPUs with NEON
    293                     buildoptions { "-mtune=cortex-a15 -mfpu=neon-vfpv4 -mfloat-abi=hard" }
     290                    -- Android uses softfp, so we should too.
     291                    buildoptions { "-mfloat-abi=softfp" }
    294292                end
    295293            end
    296294
  • libraries/source/fcollada/src/FCollada/FUtils/FUAssert.cpp

     
    22    Copyright (C) 2005-2007 Feeling Software Inc.
    33    Portions of the code are:
    44    Copyright (C) 2005-2007 Sony Computer Entertainment America
     5    Portions of the code are:
     6    Copyright (C) 2013 Wildfire Games
    57   
    68    MIT License: http://www.opensource.org/licenses/mit-license.php
    79*/
    810
    911#include "StdAfx.h"
    1012#include "FUAssert.h"
     13
     14#ifndef WIN32
     15    #include "sys/signal.h" // Used for throw(SIGTRAP) on UNIX-like systems
     16#endif
     17
    1118#ifdef __APPLE__
    12 #include <CoreServices/CoreServices.h>
     19    #include <CoreServices/CoreServices.h>
    1320#endif
    1421
    1522
     
    3037#ifdef _DEBUG
    3138    else
    3239    {
    33 #ifdef WIN32
     40    #ifdef WIN32
     41        // Use windows builtins
    3442        int32 buttonPressed = MessageBoxA(NULL, message, "Assertion failed.", MB_ABORTRETRYIGNORE | MB_ICONWARNING);
    3543        if (buttonPressed == IDABORT)
    3644        {
     
    4149        {
    4250            return true;
    4351        }
    44 #elif defined (__APPLE__)
    45         Debugger();
    46         //SysBreak();
    47 #elif defined (__arm__)
    48         __asm__("bkpt 0");
    49 #else
    50         // AFAIK This is available on all X86 platforms
    51         __asm__("int $0x03");
    52 #endif // WIN32
     52    #elif defined(__APPLE__)
     53        // Use apple builtins
     54        Debugger();
     55    #elif defined(__i386__) or defined(__LP64__)
     56        // Use hardware breakpoints on UNIX-like x86 based hardware
     57        __asm__("int $0x03");
     58    #else
     59        // Use software breakpoints as a fallback on UNIX-like systems
     60        throw(SIGTRAP);
     61    #endif
    5362        return false;
    5463    }
    5564#else // _DEBUG
  • libraries/source/fcollada/src/Makefile

     
    11OS_ARCH := $(shell uname -s)
    2 OS_CPU := $(shell uname -p)
    32
    43ifeq ($(OS_ARCH),Darwin)
    5 PIC_FLAGS ?= -fPIC
     4    PIC_FLAGS ?= -fPIC
    65else
    7 OS_DEFINE ?= -DLINUX
    8 PIC_FLAGS ?= -fpic
     6    OS_DEFINE ?= -DLINUX
     7    PIC_FLAGS ?= -fpic
    98endif
    109
    1110CXX ?= g++
    1211CXXFLAGS += -fvisibility=hidden -W -Wall -Wno-unused-parameter -Wno-unused-function $(OS_DEFINE) $(PIC_FLAGS) $(CPPFLAGS)
    13 # If we're compiling on *nix ARM, target Cortex-A15 CPUs with NEON ***mfloat-abi setting must be the same on everything linked to FCollada***
    14 ifeq ($(OS_CPU),armv7l)
    15 CXXFLAGS += -mtune=cortex-a15 -mfpu=neon-vfpv4 -mfloat-abi=hard
    16 endif
    1712CXXFLAGS_DEBUG := -O0 -g -D_DEBUG -DRETAIL
    1813CXXFLAGS_RELEASE := -O1 -DNDEBUG -DRETAIL
    1914# (-O2 with gcc 4.3 causes linker errors when using this library, for unknown reasons, so stick with -O1 until gcc >4.3 is typical.)