On Fri, Apr 08, 2011 at 08:28:27AM +0200, Duncan Sands wrote:> Hi Jack, > > > The new dragonegg 2.9 sources fail to build against either FSF gcc 4.5.2 or 4.5.3svn > > (with the i386_static.diff patch applied) on x86_64-apple-darwin10. In both cases, the > > build fails as... > > what does the command > ./TargetInfo -p > return (the TargetInfo program is created during the dragonegg build). > Some of your errors are consistent with this program failing to run. >Duncan, Yes, the result from "./TargetInfo -p" is incorrect under darwin10... x86 In FSF config.guess, we had to add... *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; to make sure that the architecture was set to the default code generation of the system compiler and not the default code architecture of the running kernel. Jack> Ciao, Duncan. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Hi Jack,>>> The new dragonegg 2.9 sources fail to build against either FSF gcc 4.5.2 or 4.5.3svn >>> (with the i386_static.diff patch applied) on x86_64-apple-darwin10. In both cases, the >>> build fails as... >> >> what does the command >> ./TargetInfo -p >> return (the TargetInfo program is created during the dragonegg build). >> Some of your errors are consistent with this program failing to run. >> > > Duncan, > Yes, the result from "./TargetInfo -p" is incorrect under darwin10... > > x86x86 is correct for both 32 bit and 64 bit machines from the x86 family. So are you sure it is wrong? Anyway, what I don't understand is why LLVM_TARGET_NAME is then undefined (see the #error from your log output) since it is defined in x86/Target.h. Ciao, Duncan.
On Fri, Apr 08, 2011 at 07:37:39AM -0400, Jack Howarth wrote:> On Fri, Apr 08, 2011 at 08:28:27AM +0200, Duncan Sands wrote: > > Hi Jack, > > > > > The new dragonegg 2.9 sources fail to build against either FSF gcc 4.5.2 or 4.5.3svn > > > (with the i386_static.diff patch applied) on x86_64-apple-darwin10. In both cases, the > > > build fails as... > > > > what does the command > > ./TargetInfo -p > > return (the TargetInfo program is created during the dragonegg build). > > Some of your errors are consistent with this program failing to run. > > > > Duncan, > Yes, the result from "./TargetInfo -p" is incorrect under darwin10... > > x86 > > In FSF config.guess, we had to add... > > *:Darwin:*:*) > UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown > case $UNAME_PROCESSOR in > i386) > eval $set_cc_for_build > if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then > if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ > (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ > grep IS_64BIT_ARCH >/dev/null > then > UNAME_PROCESSOR="x86_64" > fi > fi ;; > unknown) UNAME_PROCESSOR=powerpc ;; > esac > echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} > exit ;; > > to make sure that the architecture was set to the default code generation > of the system compiler and not the default code architecture of the running > kernel. > Jack > > > Ciao, Duncan. > > _______________________________________________ > > LLVM Developers mailing list > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdevDuncan, Also note that under darwin10, on a EMT64-capable hardware, I get... ./TargetInfo -t x86_64-apple-darwin10.5.0 ./TargetInfo -a x86_64 ./TargetInfo -p x86 So it appears that TargetInfo needs to be called with -a and not -p on darwin10. How can I effect this change in the dragonegg 2.9 sources? Jack
Hi Jack,> Also note that under darwin10, on a EMT64-capable hardware, I get... > > ./TargetInfo -t > x86_64-apple-darwin10.5.0 > > ./TargetInfo -a > x86_64 > > ./TargetInfo -p > x86 > > So it appears that TargetInfo needs to be called with -a and not -p on darwin10.no, it is correct. The -p option is used to determine which subdirectory of the dragonegg source should be used when building for the target processor. x86 is thus correct as it handles both x86-32 and x86-64. Ciao, Duncan.