Comments (6)
I'm not sure what you're asking.
You can build a binary for either 32-bit or 64-bit but not both. But a 32-bit binary will run on both i386/x86_64.
$ make CC="gcc -m64"
* rebuilding cpuid: new build flags or prefix
CC cache.o
CC clock.o
CC cpuid.o
CC feature.o
CC handlers.o
CC main.o
CC sanity.o
CC threads.o
CC util.o
GEN license.h
GEN build.h
CC version.o
LD cpuid
$ file cpuid
cpuid: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=49c338f2211fca73f84b222ee789177e2e39478a, not stripped
$ make CC="gcc -m32"
* rebuilding cpuid: new build flags or prefix
GEN build.h
DEPEND version.d
DEPEND util.d
DEPEND threads.d
DEPEND sanity.d
DEPEND main.d
DEPEND handlers.d
DEPEND feature.d
DEPEND cpuid.d
DEPEND clock.d
DEPEND cache.d
GEN build.h
CC cache.o
CC clock.o
CC cpuid.o
CC feature.o
CC handlers.o
CC main.o
CC sanity.o
CC threads.o
CC util.o
CC version.o
LD cpuid
$ file cpuid
cpuid: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=db6ccc05d4c51e036e84f64bd345aeb0c13d58fe, not stripped
from cpuid.
Hi!
Thank You for replying :)
x64 built ok but unsuccessful on x32
bash-3.2# make CC="gcc -m32"
* rebuilding cpuid: new build flags or prefix
CC cache.o
CC clock.o
CC cpuid.o
CC feature.o
CC handlers.o
CC main.o
CC sanity.o
CC threads.o
threads.c: In function ‘thread_count_native’:
threads.c:62: warning: unused parameter ‘state’
threads.c: In function ‘thread_bind_mask’:
threads.c:132: warning: unused parameter ‘_mask’
CC util.o
GEN license.h
GEN build.h
CC version.o
LD cpuid
ld: absolute addressing (perhaps -mdynamic-no-pic) used in _create_description from cache.o not allowed in slidable image. Use '-read_only_relocs suppress' to enable text relocs
collect2: ld returned 1 exit status
make: *** [cpuid] Error 1
bash-3.2#
from cpuid.
to follow up.. I am on Mac OS X
from cpuid.
Worth noting that CPUID's behavior won't be predictable on Mac OS X because they do not expose any thread affinity APIs (that's what the compiler warnings in threads.c are about -- those functions aren't actually implemented).
Why is it you're trying to do a 32-bit build on OS X, anyway? There were very few 32-bit Intel Macs released, and I believe they're unsupported these days. Assuming you have the build environment for it you could do something like CC="gcc -arch i386 -mmacosx-version-min=10.6", but I don't know how your build environment is set up.
from cpuid.
I am trying to build for my older Macs which i believe are still x32.
I will continue to experiment on how I could build it in x32 Giving me the info above will surely help. :)
Thank You so much tycho
from cpuid.
Please note that "x32" is something entirely different -- the term you are looking for is "x86-32" or just "x86".
Let me know if you succeed.
from cpuid.
Related Issues (10)
- Memory leak HOT 6
- Add cpuid man page HOT 4
- Not dumping leaf 0x10 HOT 1
- Doesn't compile in Visual Studio 2013 HOT 5
- Cross Compilation for Arm64 HOT 1
- Please add TSC non-stop HOT 7
- Build error at link time HOT 3
- Add 0x80000008 (specifically EBX for AMD)
- Reading the microcode revision number would be nice HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpuid.