|
From: | Stephan Beal |
Subject: | Re: [Tinycc-devel] Perl bindings for libtcc available on Linux and Windows. Mac help? |
Date: | Sun, 18 Aug 2013 06:15:36 +0200 |
+ # Have to try harder to get CPU architecture
+ cat >arch-test.c <<EOF
+ #include <stdio.h>
+ int main() {
+ #ifdef __x86_64__
+ /* this is x86_64, not x86-64, given the logic the cpu var below */
+ printf("x86_64");
+ #elif defined __i386__
+ printf("i386");
+ #else
+ printf("unknown");
+ #endif
+ }
+EOF
+ $cc arch-test.c -o arch-test
+ cpu=`./arch-test`
+ echo "arch-test gave $cpu"
+ rm arch-test
+ rm arch-test.c
+ ;;
*) ;;
esac
[Prev in Thread] | Current Thread | [Next in Thread] |