• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: .a under version control
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: .a under version control


  • Subject: Re: .a under version control
  • From: Andrew Carter <email@hidden>
  • Date: Thu, 18 May 2006 16:58:15 -0700

Attachment: sqlite-autoconf-macosx.patch
Description: Binary data


I created a patch to the configure.ac file that adds a new option: -- enable-macosx-universal. This will set the CFLAGS to build universal if this option is set, you are on *-*-darwin* os, and you don't have shared libraries enabled.


I'll send it to the sqlite maintainers but I doubt they would want to take it. I've never seen any universal binary options in any other autoconf projects. But this patch might make it easier if you are making your own.

Note that this would have been even easier if the sqlite autoconf wasn't non-standard. For example, setting CFLAGS and LDFLAGS as suggested in <http://developer.apple.com/documentation/Porting/ Conceptual/PortingUnix/compiling/chapter_4_section_3.html> won't work for SQLite since it uses TCC* for everything. And I couldn't find an easy way to override the core TCC flags in the same way as CFLAGS.

I know DRH has said in the past he doesn't care for the autoconf scripts and uses custom makefiles. I'm starting to think that may just be the best way to go instead of using configure.

To use this patch:
patch sqlite/configure.ac sqlite-autoconf-macosx.patch
autoconf
mkdir build
cd build
../configure --disable-shared --enable-macosx-universal


Andrew


On May 18, 2006, at 3:06 PM, Andrew Carter wrote:

This only works for static libs, right? Can something similar be done for dylib? Does anyone use SQLite as a dylib unless they use the system supplied version?

Andrew

On May 18, 2006, at 1:00 PM, Marco Bambini wrote:

The TCC line is used to set C compile and options for use in building executables.
In the Makefile created following my tutorial you'll find three TCC line:


TCC = gcc -g -O2 -DOS_UNIX=1 -DHAVE_USLEEP=1 -I. -I${TOP}/src
TCC += -DNDEBUG -DSQLITE_ALLOW_XTHREAD_CONNECT=1
TCC +=

I chose to add the universal binary settings in the latest empty TCC += line:
-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc


Hope this help.
Regards,
---
Marco Bambini
http://www.sqlabs.net
http://www.sqlabs.net/blog/



On May 18, 2006, at 9:12 PM, Andrew Carter wrote:

Marco,

This is cool. Can you explain what the TCC line is and what you added? I'd like to understand what is going on with the compiler. I'm guessing this will come up for other open source libraries we might use in a Cocoa app.

Thanks,
Andrew


On May 18, 2006, at 11:58 AM, Marco Bambini wrote:

Maybe this can help you:
http://www.sqlabs.net/blog/2006/05/compile-universal-binary- version-of.html


---
Marco Bambini

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40inquirix.com


This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40inquirix.com


This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: .a under version control
      • From: Svein E Kvernoey <email@hidden>
    • Building sqlite universal [was:Re: .a under version control]
      • From: "Peter O'Gorman" <email@hidden>
References: 
 >.a under version control (From: David Dunham <email@hidden>)
 >Re: .a under version control (From: Jim Correia <email@hidden>)
 >Re: .a under version control (From: David Dunham <email@hidden>)
 >Re: .a under version control (From: Marco Bambini <email@hidden>)
 >Re: .a under version control (From: Andrew Carter <email@hidden>)
 >Re: .a under version control (From: Marco Bambini <email@hidden>)
 >Re: .a under version control (From: Andrew Carter <email@hidden>)

  • Prev by Date: Re: GDB
  • Next by Date: Fwd: GDB
  • Previous by thread: Re: .a under version control
  • Next by thread: Building sqlite universal [was:Re: .a under version control]
  • Index(es):
    • Date
    • Thread