[PATCH] Add --with-sdkdir flag for controlling target library installation location

Jonathan Roelofs jonathan@codesourcery.com
Thu Jan 29 23:03:00 GMT 2015

On 1/26/15 3:11 PM, Jeff Johnston wrote:
> This is a global change that applies a change to all target libraries (i.e. not just newlib) since the top-level
> configure.ac needs to be kept in sync with other projects that share it (binutils/gcc).   You need to propose any such
> change to all the lists (binutils and gcc).
> That said, I think the change could definitely be cleaner.  For example, you could make the option:
> --with-target-noncanonical which would be easier for others to understand.  Then, you could either override
> the target_noncanonical value or not in one place (as opposed to changing everything to use sdk_dir).
There's a subtle difference here between what I'm calling the 'sdk_dir' 
and what 'target_noncanonical' means. It is also important to note that 
I'm not replacing *all* uses of 'target_noncanonical' with 'sdk_dir'. 
Several of the uses of 'target_noncanonical' that are not replaced in 
this patch assume that it is structured like a target triple, which is 
not necessarily true of an 'sdk_dir'. For example, I would like to 
specify something like: `configure --target arm-none-eabi 
--with-sdkdir=SDKs/baremetal_arm`, and end up with $prefix containing this:

├── SDKs
│   └── baremetal_arm
│       ├── include
│       │   └── ...
│       └── lib
│           └── ...
└── share
     └── info
         └── ...

Whereas it currently looks like this:

├── arm-none-eabi
│   ├── include
│   │   └── ...
│   └── lib
│       └── ...
└── share
     └── info
         └── ...

With that in mind, is there a better way I should be structuring my patch?



> -- Jeff J.
> ----- Original Message -----
> From: "Jonathan Roelofs" <jonathan@codesourcery.com>
> To: newlib@sourceware.org
> Sent: Monday, January 19, 2015 8:03:44 PM
> Subject: [PATCH] Add --with-sdkdir flag for controlling target library installation location
> The backstory is that I'd like to be able to have newlib install target
> libraries in a directory other than the one named after the target
> triple, so I can customize the layout of my toolchain's sysroots.
> 2015-01-19  Jonathan Roelofs  <jonathan@codesourcery.com>
> 	* configure.ac: Add new flag: --with-sdkdir=.
> 	* configure: Regenerate.

Jon Roelofs
CodeSourcery / Mentor Embedded

More information about the Newlib mailing list