<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/compile-here-run-everywhere-crosstool-ng-rrpfpu4sz" -->

---
title: Compile Here, Run Everywhere: Crosstool-Ng | daily.dev
description: A hands-on walkthrough of using Crosstool-NG to build a cross-compilation toolchain targeting a MIPS CPU in a 3D printer running stripped-down Linux. The...
canonical: https://daily.dev/posts/compile-here-run-everywhere-crosstool-ng-rrpfpu4sz
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Compile Here, Run Everywhere: Crosstool-Ng | daily.dev
og:description: A hands-on walkthrough of using Crosstool-NG to build a cross-compilation toolchain targeting a MIPS CPU in a 3D printer running stripped-down Linux. The...
og:url: https://daily.dev/posts/compile-here-run-everywhere-crosstool-ng-rrpfpu4sz
og:image: https://api.daily.dev/og/posts/rRPFPu4sz.png
og:image:alt: Compile Here, Run Everywhere: Crosstool-Ng
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Compile Here, Run Everywhere: Crosstool-Ng

**[Hackaday](https://daily.dev/sources/hackaday)** · 6 min read · 0 upvotes · 0 comments

## Summary

A hands-on walkthrough of using Crosstool-NG to build a cross-compilation toolchain targeting a MIPS CPU in a 3D printer running stripped-down Linux. The author covers what Crosstool-NG is, how target triples work, and the two main hurdles encountered: using an outdated distro package versus building from source, and configuring the unusual nan2008 floating-point convention on a mips32r2 target. The solution required adding -mnan=2008 to CFLAGS/LDFLAGS, --with-nan2008 to the C compiler options, and the same flag in the C library screen. The resulting toolchain successfully compiled busybox and a small text editor (kilo) for the printer, producing slightly smaller binaries than the Zig approach and without needing to patch ELF headers.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://hackaday.com/2026/07/22/compile-here-run-everywhere-crosstool-ng>

## Similar posts on daily.dev

- [Putting Some Zig In A Linux-Based 3D Printer](https://daily.dev/posts/putting-some-zig-in-a-linux-based-3d-printer-mhp7sbx1z) · Hackaday · 0 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux)

[View this post on daily.dev](https://daily.dev/posts/compile-here-run-everywhere-crosstool-ng-rrpfpu4sz)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Compile Here, Run Everywhere: Crosstool-Ng","url":"https://daily.dev/posts/compile-here-run-everywhere-crosstool-ng-rrpfpu4sz","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/compile-here-run-everywhere-crosstool-ng-rrpfpu4sz"},"datePublished":"2026-07-22T14:11:43.240Z","dateModified":"2026-07-22T14:12:27.163Z","description":"A hands-on walkthrough of using Crosstool-NG to build a cross-compilation toolchain targeting a MIPS CPU in a 3D printer running stripped-down Linux. The...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0e4884a047e0a5614158dae35a591b0c?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/0e4884a047e0a5614158dae35a591b0c?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hackaday","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hackaday","logo":"https://media.daily.dev/image/upload/s--JhDfhy70--/f_auto,q_auto/v1767541814/logos/hackaday","url":"https://daily.dev/sources/hackaday"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/compile-here-run-everywhere-crosstool-ng-rrpfpu4sz","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hackaday","item":"https://daily.dev/sources/hackaday"},{"@type":"ListItem","position":3,"name":"Compile Here, Run Everywhere: Crosstool-Ng"}]}
```

