Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312648 - When assigning Pkg.libTemplate, compile options need extra space padding.
Summary: When assigning Pkg.libTemplate, compile options need extra space padding.
Status: CLOSED FIXED
Alias: None
Product: RTSC
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Dave Russo CLA
QA Contact:
URL:
Whiteboard: target:3.20
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-12 11:32 EDT by Chris Ring CLA
Modified: 2010-06-01 11:20 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Ring CLA 2010-05-12 11:32:24 EDT
When assigning a .libTemplate to a package, a new "-D__xdc_bld_pkg_c__=package.bld.c" definition is added to the compile lines.  When the user supplies their own compile defs, this -D__xdc_bld_pkg_c__ option is added to the user-supplied definitions without a space between them.

In xdc/bld/_gen.xs, I see the following line - only when there is a pkg.libTemplate provided:

        libAttrs.defs = defs
            + "-D__xdc_bld_pkg_c__=package.bld.c";

I think we need to add a space before the -D 

        libAttrs.defs = defs
            + " -D__xdc_bld_pkg_c__=package.bld.c";

A workaround is that the pkg supplying their own defs must add a trailing space to their defs.
Comment 1 Dave Russo CLA 2010-05-12 11:37:20 EDT
fixed in 
    r955 (to be part of xdc-v31)
    r956 (to be part of any future 3.16 release)
Comment 2 Sasha Slijepcevic CLA 2010-05-27 14:00:58 EDT
- verified that the problem as described exists in 3.20.00.35 by adding Pkg.libTemplate and user defined 'defs' for a library.
- using 3.20.00.39 adds a space between user-defined defs and the Pkg.libTemplate addition to the command line.