title: Compiling C Source for iOS
body: <p>I have some existing source code that is written in C that I want to build and include in my iOS project.  The entire source package is very large and is built using existing Makefiles and GCC.  It is producing static libraries (.a files) that I would love to move over to my iOS project.  However, the static libraries the Makefile produces is for x86 processors, which obviously won't work on iOS.</p>
  
  <p>Is there a way I can switch GCC to build for ARMv7/ARM64 instead, <strong>without making changes to the existing source</strong> (in most cases)?  I know there is the -march switch for GCC or you can download ARM specific GCC compilers, so I know the general concept of building for a different architecture than the build machine.</p>
  
  <p>To build for ARM on Mac OS, will I have to download a different GCC compiler or is that capability built into the default GCC?</p>
  
  <p>I'm sorry for the lack of understanding of basic concepts here; I'm primarily a Java and Objective-C developer, so building source for different architectures is a mostly foreign concept to me.</p>