diff mbox series

[oe,meta-oe] log4cplus: Fix build with gold linker

Message ID 20190722211814.14237-2-raj.khem@gmail.com
State New
Headers show
Series [oe,meta-oe] log4cplus: Fix build with gold linker | expand

Commit Message

Khem Raj July 22, 2019, 9:18 p.m. UTC
Fixes a potential linker error and eventual linker crash when using gold
linker [1]

[1] https://errors.yoctoproject.org/Errors/Details/253440/

Signed-off-by: Khem Raj <raj.khem@gmail.com>

Cc: Adrian Bunk <bunk@stusta.de>
Cc: Mingli Yu <mingli.yu@windriver.com>
---
 ...-version-entry-from-ELF-.comment-sec.patch | 40 +++++++++++++++++++
 .../log4cplus/log4cplus_2.0.4.bb              |  6 ++-
 2 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch

-- 
2.22.0

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Comments

Adrian Bunk July 23, 2019, 7:53 a.m. UTC | #1
On Mon, Jul 22, 2019 at 02:18:14PM -0700, Khem Raj wrote:
> Fixes a potential linker error and eventual linker crash when using gold

> linker [1]

> 

> [1] https://errors.yoctoproject.org/Errors/Details/253440/

>...


AFAIR these build logs are not permanently stored, so quoting the error 
message might be more useful than a soon defunct URL in the git history.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Khem Raj July 23, 2019, 1:58 p.m. UTC | #2
On Tue, Jul 23, 2019 at 12:53 AM Adrian Bunk <bunk@stusta.de> wrote:
>

> On Mon, Jul 22, 2019 at 02:18:14PM -0700, Khem Raj wrote:

> > Fixes a potential linker error and eventual linker crash when using gold

> > linker [1]

> >

> > [1] https://errors.yoctoproject.org/Errors/Details/253440/

> >...

>

> AFAIR these build logs are not permanently stored, so quoting the error

> message might be more useful than a soon defunct URL in the git history.

>


thats a good point

> cu

> Adrian

>

> --

>

>        "Is there not promise of rain?" Ling Tan asked suddenly out

>         of the darkness. There had been need of rain for many days.

>        "Only a promise," Lao Er said.

>                                        Pearl S. Buck - Dragon Seed

>

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Yu, Mingli July 31, 2019, 6:37 a.m. UTC | #3
Hi Khem,

On 2019年07月23日 05:18, Khem Raj wrote:
> Fixes a potential linker error and eventual linker crash when using gold
> linker [1]
>
> [1] https://errors.yoctoproject.org/Errors/Details/253440/
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Cc: Adrian Bunk <bunk@stusta.de>
> Cc: Mingli Yu <mingli.yu@windriver.com>
> ---
>   ...-version-entry-from-ELF-.comment-sec.patch | 40 +++++++++++++++++++
>   .../log4cplus/log4cplus_2.0.4.bb              |  6 ++-
>   2 files changed, 45 insertions(+), 1 deletion(-)
>   create mode 100644 meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
>
> diff --git a/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch b/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
> new file mode 100644
> index 0000000000..44a835c35f
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
> @@ -0,0 +1,40 @@
> +From da5338e68f146efadab7c221291ba4c949d8f12f Mon Sep 17 00:00:00 2001
> +From: Vaclav Haisman <vhaisman@gmail.com>
> +Date: Sun, 21 Jul 2019 23:23:16 -0700
> +Subject: [PATCH] Remove log4cplus version entry from ELF .comment section
> +
> +Reverts
> +https://github.com/log4cplus/log4cplus/commit/9cb0d4ade619da4e40628c9b95ff51de3df29f1b
> +
> +Upstream-Status: Backport [https://github.com/log4cplus/log4cplus/commit/7e6addc70dffd2e30e902efd18eb845c5d5dd7bb]
> +
> +Suggested-by: Adrian Bunk <bunk@stusta.de>
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> + src/version.cxx | 12 ------------
> + 1 file changed, 12 deletions(-)
> +
> +diff --git a/src/version.cxx b/src/version.cxx
> +index ce18212..e002de9 100644
> +--- a/src/version.cxx
> ++++ b/src/version.cxx
> +@@ -34,16 +34,4 @@ namespace log4cplus
> + unsigned const version = LOG4CPLUS_VERSION;
> + char const versionStr[] = LOG4CPLUS_VERSION_STR LOG4CPLUS_VERSION_STR_SUFFIX;
> +
> +-namespace
> +-{
> +-
> +-#if defined (__ELF__) && (defined (__GNUC__) || defined (__clang__))
> +-char const versionStrComment[]
> +-    __attribute__ ((__used__, __section__ ((".comment"))))
> +-    = "log4cplus " LOG4CPLUS_VERSION_STR LOG4CPLUS_VERSION_STR_SUFFIX;
> +-#endif
> +-
> +-
> +-} // namespace
> +-
> + } // namespace log4cplus
> +--
> +2.22.0
> +
> diff --git a/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb b/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
> index d86521aba3..b396cabf3f 100644
> --- a/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
> +++ b/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
> @@ -6,7 +6,9 @@ BUGTRACKER = "http://sourceforge.net/p/log4cplus/bugs/"
>   LICENSE = "Apache-2.0 & BSD-2-Clause"
>   LIC_FILES_CHKSUM = "file://LICENSE;md5=41e8e060c26822886b592ab4765c756b"
>
> -SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}-stable/${PV}/${BP}.tar.gz"
> +SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}-stable/${PV}/${BP}.tar.gz \
> +           file://0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch \
> +          "
>   SRC_URI[md5sum] = "2b5b7bc294698bf30a315a259ef9eec2"
>   SRC_URI[sha256sum] = "196eedbc7f2dd792dae721b1159c7ac132255bb368226353c24d4d5fa7c7797a"
>
> @@ -16,3 +18,5 @@ UPSTREAM_CHECK_REGEX = "log4cplus-stable/(?P<pver>\d+(\.\d+)+)/"
>   inherit autotools pkgconfig
>
>   BBCLASSEXTEND = "native"
> +
> +CXXFLAGS += "-fuse-ld=gold"

The logic [CXXFLAGS += "-fuse-ld=gold"] you added is used to fix the 
linker crash on arm though I didn't encounter.

BTW, after you add [CXXFLAGS += "-fuse-ld=gold"], it fails the build for 
"bitbake libn32-log4cplus" with below logic in local.conf
MACHINE ??= "qemumips64"
MULTILIB_GLOBAL_VARIANTS_append = " libn32"
MULTILIBS ?= "multilib:lib32 multilib:libn32"
DEFAULTTUNE_virtclass-multilib-lib32 ?= "mips"
DEFAULTTUNE_virtclass-multilib-libn32 ?= "mips64-n32"
require conf/multilib.conf

Thanks,

>
Khem Raj July 31, 2019, 6:46 a.m. UTC | #4
On Tue, Jul 30, 2019 at 11:36 PM Yu, Mingli <mingli.yu@windriver.com> wrote:
>
> Hi Khem,
>
> On 2019年07月23日 05:18, Khem Raj wrote:
> > Fixes a potential linker error and eventual linker crash when using gold
> > linker [1]
> >
> > [1] https://errors.yoctoproject.org/Errors/Details/253440/
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > Cc: Adrian Bunk <bunk@stusta.de>
> > Cc: Mingli Yu <mingli.yu@windriver.com>
> > ---
> >   ...-version-entry-from-ELF-.comment-sec.patch | 40 +++++++++++++++++++
> >   .../log4cplus/log4cplus_2.0.4.bb              |  6 ++-
> >   2 files changed, 45 insertions(+), 1 deletion(-)
> >   create mode 100644 meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
> >
> > diff --git a/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch b/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
> > new file mode 100644
> > index 0000000000..44a835c35f
> > --- /dev/null
> > +++ b/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
> > @@ -0,0 +1,40 @@
> > +From da5338e68f146efadab7c221291ba4c949d8f12f Mon Sep 17 00:00:00 2001
> > +From: Vaclav Haisman <vhaisman@gmail.com>
> > +Date: Sun, 21 Jul 2019 23:23:16 -0700
> > +Subject: [PATCH] Remove log4cplus version entry from ELF .comment section
> > +
> > +Reverts
> > +https://github.com/log4cplus/log4cplus/commit/9cb0d4ade619da4e40628c9b95ff51de3df29f1b
> > +
> > +Upstream-Status: Backport [https://github.com/log4cplus/log4cplus/commit/7e6addc70dffd2e30e902efd18eb845c5d5dd7bb]
> > +
> > +Suggested-by: Adrian Bunk <bunk@stusta.de>
> > +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > +---
> > + src/version.cxx | 12 ------------
> > + 1 file changed, 12 deletions(-)
> > +
> > +diff --git a/src/version.cxx b/src/version.cxx
> > +index ce18212..e002de9 100644
> > +--- a/src/version.cxx
> > ++++ b/src/version.cxx
> > +@@ -34,16 +34,4 @@ namespace log4cplus
> > + unsigned const version = LOG4CPLUS_VERSION;
> > + char const versionStr[] = LOG4CPLUS_VERSION_STR LOG4CPLUS_VERSION_STR_SUFFIX;
> > +
> > +-namespace
> > +-{
> > +-
> > +-#if defined (__ELF__) && (defined (__GNUC__) || defined (__clang__))
> > +-char const versionStrComment[]
> > +-    __attribute__ ((__used__, __section__ ((".comment"))))
> > +-    = "log4cplus " LOG4CPLUS_VERSION_STR LOG4CPLUS_VERSION_STR_SUFFIX;
> > +-#endif
> > +-
> > +-
> > +-} // namespace
> > +-
> > + } // namespace log4cplus
> > +--
> > +2.22.0
> > +
> > diff --git a/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb b/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
> > index d86521aba3..b396cabf3f 100644
> > --- a/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
> > +++ b/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
> > @@ -6,7 +6,9 @@ BUGTRACKER = "http://sourceforge.net/p/log4cplus/bugs/"
> >   LICENSE = "Apache-2.0 & BSD-2-Clause"
> >   LIC_FILES_CHKSUM = "file://LICENSE;md5=41e8e060c26822886b592ab4765c756b"
> >
> > -SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}-stable/${PV}/${BP}.tar.gz"
> > +SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}-stable/${PV}/${BP}.tar.gz \
> > +           file://0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch \
> > +          "
> >   SRC_URI[md5sum] = "2b5b7bc294698bf30a315a259ef9eec2"
> >   SRC_URI[sha256sum] = "196eedbc7f2dd792dae721b1159c7ac132255bb368226353c24d4d5fa7c7797a"
> >
> > @@ -16,3 +18,5 @@ UPSTREAM_CHECK_REGEX = "log4cplus-stable/(?P<pver>\d+(\.\d+)+)/"
> >   inherit autotools pkgconfig
> >
> >   BBCLASSEXTEND = "native"
> > +
> > +CXXFLAGS += "-fuse-ld=gold"
>
> The logic [CXXFLAGS += "-fuse-ld=gold"] you added is used to fix the
> linker crash on arm though I didn't encounter.

this was not needed infact. It was for testing only please send a
patch to remove
 CXXFLAGS += "-fuse-ld=gold"
>
> BTW, after you add [CXXFLAGS += "-fuse-ld=gold"], it fails the build for
> "bitbake libn32-log4cplus" with below logic in local.conf
> MACHINE ??= "qemumips64"
> MULTILIB_GLOBAL_VARIANTS_append = " libn32"
> MULTILIBS ?= "multilib:lib32 multilib:libn32"
> DEFAULTTUNE_virtclass-multilib-lib32 ?= "mips"
> DEFAULTTUNE_virtclass-multilib-libn32 ?= "mips64-n32"
> require conf/multilib.conf
>
> Thanks,
>
> >
Yu, Mingli July 31, 2019, 6:52 a.m. UTC | #5
On 2019年07月31日 14:46, Khem Raj wrote:
> On Tue, Jul 30, 2019 at 11:36 PM Yu, Mingli <mingli.yu@windriver.com> wrote:
>>
>> Hi Khem,
>>
>> On 2019年07月23日 05:18, Khem Raj wrote:
>>> Fixes a potential linker error and eventual linker crash when using gold
>>> linker [1]
>>>
>>> [1] https://errors.yoctoproject.org/Errors/Details/253440/
>>>
>>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>>> Cc: Adrian Bunk <bunk@stusta.de>
>>> Cc: Mingli Yu <mingli.yu@windriver.com>
>>> ---
>>>    ...-version-entry-from-ELF-.comment-sec.patch | 40 +++++++++++++++++++
>>>    .../log4cplus/log4cplus_2.0.4.bb              |  6 ++-
>>>    2 files changed, 45 insertions(+), 1 deletion(-)
>>>    create mode 100644 meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
>>>
>>> diff --git a/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch b/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
>>> new file mode 100644
>>> index 0000000000..44a835c35f
>>> --- /dev/null
>>> +++ b/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
>>> @@ -0,0 +1,40 @@
>>> +From da5338e68f146efadab7c221291ba4c949d8f12f Mon Sep 17 00:00:00 2001
>>> +From: Vaclav Haisman <vhaisman@gmail.com>
>>> +Date: Sun, 21 Jul 2019 23:23:16 -0700
>>> +Subject: [PATCH] Remove log4cplus version entry from ELF .comment section
>>> +
>>> +Reverts
>>> +https://github.com/log4cplus/log4cplus/commit/9cb0d4ade619da4e40628c9b95ff51de3df29f1b
>>> +
>>> +Upstream-Status: Backport [https://github.com/log4cplus/log4cplus/commit/7e6addc70dffd2e30e902efd18eb845c5d5dd7bb]
>>> +
>>> +Suggested-by: Adrian Bunk <bunk@stusta.de>
>>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>>> +---
>>> + src/version.cxx | 12 ------------
>>> + 1 file changed, 12 deletions(-)
>>> +
>>> +diff --git a/src/version.cxx b/src/version.cxx
>>> +index ce18212..e002de9 100644
>>> +--- a/src/version.cxx
>>> ++++ b/src/version.cxx
>>> +@@ -34,16 +34,4 @@ namespace log4cplus
>>> + unsigned const version = LOG4CPLUS_VERSION;
>>> + char const versionStr[] = LOG4CPLUS_VERSION_STR LOG4CPLUS_VERSION_STR_SUFFIX;
>>> +
>>> +-namespace
>>> +-{
>>> +-
>>> +-#if defined (__ELF__) && (defined (__GNUC__) || defined (__clang__))
>>> +-char const versionStrComment[]
>>> +-    __attribute__ ((__used__, __section__ ((".comment"))))
>>> +-    = "log4cplus " LOG4CPLUS_VERSION_STR LOG4CPLUS_VERSION_STR_SUFFIX;
>>> +-#endif
>>> +-
>>> +-
>>> +-} // namespace
>>> +-
>>> + } // namespace log4cplus
>>> +--
>>> +2.22.0
>>> +
>>> diff --git a/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb b/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
>>> index d86521aba3..b396cabf3f 100644
>>> --- a/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
>>> +++ b/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
>>> @@ -6,7 +6,9 @@ BUGTRACKER = "http://sourceforge.net/p/log4cplus/bugs/"
>>>    LICENSE = "Apache-2.0 & BSD-2-Clause"
>>>    LIC_FILES_CHKSUM = "file://LICENSE;md5=41e8e060c26822886b592ab4765c756b"
>>>
>>> -SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}-stable/${PV}/${BP}.tar.gz"
>>> +SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}-stable/${PV}/${BP}.tar.gz \
>>> +           file://0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch \
>>> +          "
>>>    SRC_URI[md5sum] = "2b5b7bc294698bf30a315a259ef9eec2"
>>>    SRC_URI[sha256sum] = "196eedbc7f2dd792dae721b1159c7ac132255bb368226353c24d4d5fa7c7797a"
>>>
>>> @@ -16,3 +18,5 @@ UPSTREAM_CHECK_REGEX = "log4cplus-stable/(?P<pver>\d+(\.\d+)+)/"
>>>    inherit autotools pkgconfig
>>>
>>>    BBCLASSEXTEND = "native"
>>> +
>>> +CXXFLAGS += "-fuse-ld=gold"
>>
>> The logic [CXXFLAGS += "-fuse-ld=gold"] you added is used to fix the
>> linker crash on arm though I didn't encounter.
>
> this was not needed infact. It was for testing only please send a
> patch to remove
>   CXXFLAGS += "-fuse-ld=gold"

Okay, thanks Khem!

Thanks,

>>
>> BTW, after you add [CXXFLAGS += "-fuse-ld=gold"], it fails the build for
>> "bitbake libn32-log4cplus" with below logic in local.conf
>> MACHINE ??= "qemumips64"
>> MULTILIB_GLOBAL_VARIANTS_append = " libn32"
>> MULTILIBS ?= "multilib:lib32 multilib:libn32"
>> DEFAULTTUNE_virtclass-multilib-lib32 ?= "mips"
>> DEFAULTTUNE_virtclass-multilib-libn32 ?= "mips64-n32"
>> require conf/multilib.conf
>>
>> Thanks,
>>
>>>
>
diff mbox series

Patch

diff --git a/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch b/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
new file mode 100644
index 0000000000..44a835c35f
--- /dev/null
+++ b/meta-oe/recipes-devtools/log4cplus/log4cplus/0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch
@@ -0,0 +1,40 @@ 
+From da5338e68f146efadab7c221291ba4c949d8f12f Mon Sep 17 00:00:00 2001
+From: Vaclav Haisman <vhaisman@gmail.com>
+Date: Sun, 21 Jul 2019 23:23:16 -0700
+Subject: [PATCH] Remove log4cplus version entry from ELF .comment section
+
+Reverts
+https://github.com/log4cplus/log4cplus/commit/9cb0d4ade619da4e40628c9b95ff51de3df29f1b
+
+Upstream-Status: Backport [https://github.com/log4cplus/log4cplus/commit/7e6addc70dffd2e30e902efd18eb845c5d5dd7bb]
+
+Suggested-by: Adrian Bunk <bunk@stusta.de>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/version.cxx | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+diff --git a/src/version.cxx b/src/version.cxx
+index ce18212..e002de9 100644
+--- a/src/version.cxx
++++ b/src/version.cxx
+@@ -34,16 +34,4 @@ namespace log4cplus
+ unsigned const version = LOG4CPLUS_VERSION;
+ char const versionStr[] = LOG4CPLUS_VERSION_STR LOG4CPLUS_VERSION_STR_SUFFIX;
+ 
+-namespace
+-{
+-
+-#if defined (__ELF__) && (defined (__GNUC__) || defined (__clang__))
+-char const versionStrComment[]
+-    __attribute__ ((__used__, __section__ ((".comment"))))
+-    = "log4cplus " LOG4CPLUS_VERSION_STR LOG4CPLUS_VERSION_STR_SUFFIX;
+-#endif
+-
+-
+-} // namespace
+-
+ } // namespace log4cplus
+-- 
+2.22.0
+
diff --git a/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb b/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
index d86521aba3..b396cabf3f 100644
--- a/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
+++ b/meta-oe/recipes-devtools/log4cplus/log4cplus_2.0.4.bb
@@ -6,7 +6,9 @@  BUGTRACKER = "http://sourceforge.net/p/log4cplus/bugs/"
 LICENSE = "Apache-2.0 & BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=41e8e060c26822886b592ab4765c756b"
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}-stable/${PV}/${BP}.tar.gz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}-stable/${PV}/${BP}.tar.gz \
+           file://0001-Remove-log4cplus-version-entry-from-ELF-.comment-sec.patch \
+          "
 SRC_URI[md5sum] = "2b5b7bc294698bf30a315a259ef9eec2"
 SRC_URI[sha256sum] = "196eedbc7f2dd792dae721b1159c7ac132255bb368226353c24d4d5fa7c7797a"
 
@@ -16,3 +18,5 @@  UPSTREAM_CHECK_REGEX = "log4cplus-stable/(?P<pver>\d+(\.\d+)+)/"
 inherit autotools pkgconfig
 
 BBCLASSEXTEND = "native"
+
+CXXFLAGS += "-fuse-ld=gold"