On 07/28/12 00:42, Jordan Justen wrote:
> UNIXGCC builds larger images than GCC44, and can have issues
> fitting into the FD image. Therefore, when using UNIXGCC,
> debug will be disabled by default.
> 
> The README file is updated with instructions for selectively
> enabling debug for UNIXGCC.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jordan Justen <[email protected]>
> ---
>  OvmfPkg/OvmfPkgIa32.dsc    |  1 +
>  OvmfPkg/OvmfPkgIa32X64.dsc |  1 +
>  OvmfPkg/OvmfPkgX64.dsc     |  1 +
>  OvmfPkg/README             | 19 +++++++++++++++++++
>  4 files changed, 22 insertions(+)
> 
> diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
> index 1414218..992de34 100644
> --- a/OvmfPkg/OvmfPkgIa32.dsc
> +++ b/OvmfPkg/OvmfPkgIa32.dsc
> @@ -36,6 +36,7 @@
>    DEFINE SECURE_BOOT_ENABLE      = FALSE
>  
>  [BuildOptions]
> +  GCC:*_UNIXGCC_*_CC_FLAGS             = -DMDEPKG_NDEBUG
>    GCC:RELEASE_*_*_CC_FLAGS             = -DMDEPKG_NDEBUG
>    INTEL:RELEASE_*_*_CC_FLAGS           = /D MDEPKG_NDEBUG
>    MSFT:RELEASE_*_*_CC_FLAGS            = /D MDEPKG_NDEBUG
> diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
> index 957f394..319066c 100644
> --- a/OvmfPkg/OvmfPkgIa32X64.dsc
> +++ b/OvmfPkg/OvmfPkgIa32X64.dsc
> @@ -36,6 +36,7 @@
>    DEFINE SECURE_BOOT_ENABLE      = FALSE
>  
>  [BuildOptions]
> +  GCC:*_UNIXGCC_*_CC_FLAGS             = -DMDEPKG_NDEBUG
>    GCC:RELEASE_*_*_CC_FLAGS             = -DMDEPKG_NDEBUG
>    INTEL:RELEASE_*_*_CC_FLAGS           = /D MDEPKG_NDEBUG
>    MSFT:RELEASE_*_*_CC_FLAGS            = /D MDEPKG_NDEBUG
> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> index b56c551..636db05 100644
> --- a/OvmfPkg/OvmfPkgX64.dsc
> +++ b/OvmfPkg/OvmfPkgX64.dsc
> @@ -36,6 +36,7 @@
>    DEFINE SECURE_BOOT_ENABLE      = FALSE
>  
>  [BuildOptions]
> +  GCC:*_UNIXGCC_*_CC_FLAGS             = -DMDEPKG_NDEBUG
>    GCC:RELEASE_*_*_CC_FLAGS             = -DMDEPKG_NDEBUG
>    INTEL:RELEASE_*_*_CC_FLAGS           = /D MDEPKG_NDEBUG
>    MSFT:RELEASE_*_*_CC_FLAGS            = /D MDEPKG_NDEBUG
> diff --git a/OvmfPkg/README b/OvmfPkg/README
> index 04a658f..51041a0 100644
> --- a/OvmfPkg/README
> +++ b/OvmfPkg/README
> @@ -115,3 +115,22 @@ To add network drivers to OVMF:
>      -net nic,model=e1000,addr=3 -net nic,model=e1000,addr=4
>      -net user,restrict=yes -net user,dhcpstart=10.0.2.10
>  
> +=== UNIXGCC Debug ===
> +
> +If you build with the UNIXGCC toolchain, then debugging will be disabled
> +due to larger image sizes being produced by the UNIXGCC toolchain. The
> +first choice recommendation is to use GCC44 or newer instead.
> +
> +If you must use UNIXGCC, then you can override the build options for
> +particular libraries and modules in the .dsc to re-enable debugging
> +selectively. For example:
> +  [Components]
> +  OvmfPkg/Library/PlatformBdsLib/PlatformBdsLib.inf {
> +    <BuildOptions>
> +      GCC:*_*_*_CC_FLAGS             = -UMDEPKG_NDEBUG
> +  }
> +  IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf {
> +    <BuildOptions>
> +      GCC:*_*_*_CC_FLAGS             = -UMDEPKG_NDEBUG
> +  }
> +

Can't test it, but after checking the dsc files and Conf/tools_def.txt,
it looks good to me. FWIW,

Reviewed-by: Laszlo Ersek <[email protected]>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to