Quick tips I keep pinned: pure-Go cross-compiles are frictionless — GOOS=linux GOARCH=s390x CGO_ENABLED=0 go build — and you can inspect the result with file to verify architecture. If you get an ELF header or illegal instruction at runtime, double-check GOARCH, re-run file, and ensure you didn’t accidentally copy an amd64 binary into an s390x host.
If you must use cgo, the headache is the cross toolchain: you need an s390x-targeting gcc and the right sysroot; set CC and CGO_ENABLED=1 and be ready for platform-specific build flags. For CI, either spin up an s390x runner or use qemu with binfmt_misc so your runners can execute s390x binaries. And remember little conveniences: add -ldflags='-s -w' to strip debug symbols, use module-aware builds (GOFLAGS or go env GOPROXY) so dependency resolution is stable, and test on real hardware when possible — emulators are great, but the hardware occasionally surprises me.
Building Go for s390x is way easier than I used to expect — once you know the tiny set of knobs to flip. I’ve cross-compiled a couple of small services for IBM Z boxes and the trickiest part was simply remembering to disable cgo unless I had a proper cross-GCC toolchain.
Practically, for a pure Go program the canonical command I use is very simple: set GOOS=linux and GOARCH=s390x, and turn off CGO so the build doesn’t try to invoke a C compiler. For example:
GOOS=linux GOARCH=s390x CGO_ENABLED=0 go build -o myprog_s390x ./...
That produces an s390x ELF binary you can check with file myprog_s390x. If you need smaller binaries I usually add ldflags like -ldflags='-s -w'. If your project uses cgo (native libs), you’ll need a cross-compiler for s390x and to set CC appropriately (e.g. CC=s390x-linux-gnu-gcc), but the package names and toolchain installation vary by distro. When I couldn’t access hardware I tested with qemu (qemu-system-s390x for full systems, or register qemu-user in binfmt_misc) to sanity-check startup.
I also sometimes use Docker buildx or CI (GitHub Actions) to cross-build images, but for pure Go binaries the env-variable approach is the fastest way to get a working s390x binary on an x86 machine. If you run into weird syscalls or platform-specific bugs, running the binary on a real s390x VM or CI runner usually tells you what to fix.
Cutting to the chase: I like a compact, no-nonsense checklist when I need reproducible cross-builds. Start by deciding whether you need cgo. If not, the job is trivial: environment variables, go build, confirm with file.
Commands I run most often: GOOS=linux GOARCH=s390x CGO_ENABLED=0 go build -v -o ./build/myapp_s390x ./cmd/myapp file ./build/myapp_s390x # should report ELF 64-bit LSB executable, s390x
If your app links to native libs (cgo), you’ll either install an s390x cross-toolchain on your build machine or build on an s390x builder. On Debian/Ubuntu the cross gcc often appears under names like s390x-linux-gnu-gcc (package names vary). Then set CC to that cross-compiler and keep CGO_ENABLED=1. Example: CGO_ENABLED=1 CC=s390x-linux-gnu-gcc GOOS=linux GOARCH=s390x go build -o myprog_s390x
For CI or multi-arch Docker images I use Docker Buildx or GitHub Actions with a build matrix (GOARCH: s390x). Buildx can produce images for linux/s390x directly (docker buildx build --platform linux/s390x …), which is handy when you want the whole image to run on IBM Z hardware or emulators. When in doubt test on a real s390x VM or via qemu-system-s390x; that catches runtime behavior differences fast.
2025-09-09 09:41:21
9
View All Answers
Scan code to download App
Related Books
Possessing The Gamma: The Silver Run Series
Emma Taylor
9.6
36.6K
Charity Conrad has plenty of problems, but being the Gamma isn’t one of them. No, her biggest issues are the two gorgeous men fighting for her attention. What's worse is the growing attachment she feels for both.
She thought some time away would lessen her conflicting feelings for them, but upon her return she realizes just how wrong she was. With her eighteenth birthday rapidly approaching can she survive without someone getting their heart broken?
Book 3 of The Silver Run Series. Can be read as a standalone.
The Silver Run Series
Book 1- Possessing My Alpha- Completed
Book 2- Possessing My Mate- Completed
Book 3- Possessing The Gamma- Near Daily Updates
Warning: This isn't for saints seeking redemption! It's a collection of Raw, Forbidden tales, ONLY for sinners, good girls begging to be defiled by Daddy’s hot strokes!
ONLY read if you want the thrill of warmth slipping down your slit… You’ll clench those filthy thighs, squeeze against your wetness, and beg with a racing heart, but no, there’s no mercy. Because when you're done, you’ll be soaked up, and shaking from climax without being touched.
Every story is dark, perverted, dipped in filth. They’ll mess with your mind till they break you, ruin you. Neglected girlfriends take the wildest revenge on their cheating ex with his favorite hockey stars. Milfs get pinned down and devoured by their hot stepsons. Sisters get ravaged by their brother’s besties while he sleeps down the hall.
No safe words. No escape. Read at your own risk.
Tasoshi Saya, the Supreme God of Zeronity.
He was the strongest god to ever live. A mountain of strength that could never be crossed.
On the day of his match against his opponent, the Breakers—he was suddenly transported into another world. A world filled with swords and magic.
Power? Glory? All that was lost as he entered into the new world.
Yet, despite his helplessness, the 'Supreme' God of Zeronity was excited.
Challenges that will arise from the weak, opponents whom would stand against him toe to toe—the journey begins.
In the decaying super-city of Aethelgard, a desperate gamer accepts a mysterious beta-test offer to escape poverty. But when he discovers his in-game "assassination missions" are actually controlling lethal androids to eliminate the government’s political rivals, he must hack the system from the inside to stop a silent coup before his physical body is deleted.
GOMORRAH DADDIES: Desire of Sin
The first time he put his hand around my throat, I didn't fight. I thanked him.
Not out loud. But my body felt it—every nerve, every dark pulse. He knew it. They always know it. The way you crumble when a man old enough to know better looks at you like you're the only target he's had in years. The way your mouth goes dry when he calls you good boy in that voice—low, ruined, hungry—and you realize you've been starving your whole life for someone who isn't afraid to take charge.
GOMORRAH DADDIES isn't a simple love story. It's a confession. A bleeding, breathless catalog of every dark choice you've ever wanted and been too terrified to name.
Your best friend's father who finally stops pretending he hasn't memorized your shadow. The silver fox next door who teaches you exactly how he rules—slow, intense, deep—while his gold ring glints in the dark. The alpha who doesn't ask before he claims what's already his, who holds you down and whispers mine until you believe it with your whole broken heart. The age gap that should make you run, but instead has you staying, begging him to stay, to ruin you, to keep you.
Every story is a different challenge. Every leader is a different path. And every single one of them knows what you need before you do.
They don't come to guide you gently.
They come to change you completely.
And you're already listening, aren't you?
Content Warning: Contains intense MM drama, power imbalances, large age gap relationships, and dark themes that will keep you reading late into the night.
Even being the late King's son can't guarantee you the throne of Serenacia, as the system is different from any other kingdom you've heard.
A kingdom filled with power, control, freedom and most importantly, Gods.
Gods who can strike you down just with the mere snap of their fingers and also God's who would strike you down and leave you speechless, based on their physique and attractiveness.
But it isn't all about that, as the throne of Serenacia is open for a new king of Gods to rule them, yet it isn't so simple as in Serenacia, if a king dies before passing the throne to his heir, then all the generations of the bloodline of God's would have to compete for the throne once again, and that hasn't been done since the last thousand years.
Nevertheless, it's isn't just about the throne, as love interest and triangles are formed, after all its no fun if no one catches feelings.