title: Using conditional logic with env variable in GCC Linker script
body: <p>I have a build environment variable available, let's say for differentiating 2 hardware variants: HW_VER1 </p>
  
  <p>We are using linker script in build.</p>
  
  <p>So, we want something like this.  But, of course below gives error "invalid syntax in flags"</p>
  
  <pre><code>MEMORY
  {
  
     ifeq ($(HW_VER1),YES)
        iram0_0_seg :                         org = 0x00080400, len = 0x21C00  
     else
        iram0_0_seg :                         org = 0x00080400, len = 0xf1C00
     endif
  }
  </code></pre>
  
  <p>The requirement is not to use 2 linker scripts with the same exact contents, except the len value above, and let build system decide which one based on the env variable (the one with bigger len or smaller len based on the hw ver)  </p>