[OpenWrt-Devel] STAGING_DIR vs. --sysroot

Rüdiger, Christoph Christoph.Ruediger at thyssenkrupp.com
Fri Nov 6 09:24:24 EST 2015

Hi folks,

I'm wondering a bit why the OpenWrt toolchains rely on a set STAGING_DIR environment variable. I haven't found any documentation on this except "You have to set it". Examining the source tree of gcc didn't show me any STAGING_DIR occurrence. It seems to be used only in the specs file. And from examining these, I get the feeling that the STAGING_DIR environment variable is used to work around or against the sysroot setting.

As the OpenWrt SDK is the first gcc I've worked with that rely on a command line variable, my question is: Why did OpenWrt introduced this (uncommon?) extension instead of an additional command line argument?

The STAGING_DIR env variable makes it difficult to work with in build systems like cmake where you have to give a toolchain file with the compiler flags and paths and have to set the environment variable for each build.


ThyssenKrupp Elevator Innovation GmbH
PDC Neuhausen
TKEI Elevator Control
Bernhaeuser Straße 45
73765 Neuhausen, Germany

Phone +49 7158 12-2615
christoph.ruediger at thyssenkrupp.com

Company domicile: Essen      Commercial register: Essen HRB 20 839
Postal address: ThyssenKrupp Allee 1, 45143 Essen, Germany 
Executive Board: Gerhard Thumm, Katrin Huenger, Philippe Choleau

openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list