Monday, January 30, 2023

Fix hiawatha build on sparc64 (was Re: Mark www/hiawatha ONLY_FOR_ARCHS = LLD_ARCHS)

On Mon, Jan 30, 2023 at 03:09:49PM -0500, Kurt Mosiejczuk wrote:
> hiawatha is specifying DWARF-4 debug format and ld.bfd only understands up
> to version 2. So mark it ONLY_FOR_ARCHS = ${LLD_ARCHS}

Brad Smith pointed out he has submitted a change upstream to not hardcode
the debug format. So I've used that here instead for use prior to the
next release.

ok?

--Kurt

Index: Makefile
===================================================================
RCS file: /cvs/ports/www/hiawatha/Makefile,v
retrieving revision 1.70
diff -u -p -r1.70 Makefile
--- Makefile 27 Jan 2023 11:38:55 -0000 1.70
+++ Makefile 31 Jan 2023 04:06:36 -0000
@@ -1,6 +1,7 @@
COMMENT = secure webserver
DISTNAME = hiawatha-11.3
CATEGORIES = www net
+REVISION = 0

HOMEPAGE = https://www.hiawatha-webserver.org/

Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/www/hiawatha/patches/patch-CMakeLists_txt,v
retrieving revision 1.4
diff -u -p -r1.4 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt 27 Jan 2023 11:38:55 -0000 1.4
+++ patches/patch-CMakeLists_txt 31 Jan 2023 04:06:36 -0000
@@ -1,9 +1,20 @@
Don't install Let's Encrypt script, which relies on PHP. We have acme-client(1)
in base, and several alternatives in ports.

+Remove hardcoded dwarf-4 debug format that ld.bfd doesn't handle
+
Index: CMakeLists.txt
--- CMakeLists.txt.orig
+++ CMakeLists.txt
+@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0)
+ project(Hiawatha VERSION 11.3 LANGUAGES C)
+
+ # Compiler
+-set(CMAKE_C_FLAGS "-O2 -Wall -Wextra ${CMAKE_C_FLAGS} -gdwarf-4")
++set(CMAKE_C_FLAGS "-O2 -Wall -Wextra ${CMAKE_C_FLAGS} -g")
+ set(CMAKE_BUILD_TYPE "RelWithDebInfo")
+
+ # Options
@@ -171,15 +171,15 @@ endforeach()

install(FILES extra/index.html DESTINATION ${WEBROOT_DIR})

No comments:

Post a Comment