Last Comment Bug 238540 - Add support for DragonFly BSD
: Add support for DragonFly BSD
Status: NEW
:
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: Trunk
: All Other
: -- normal with 2 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Nathan Froyd [:froydnj]
Mentors:
: 326884 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-03-24 11:21 PST by Andy Hauser
Modified: 2010-05-29 03:00 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Needed to compile on DragonFly BSD (CCVER=gcc34) (376 bytes, patch)
2005-10-14 13:28 PDT, Andy Hauser
no flags Details | Diff | Splinter Review
Updated patch for Firefox 1.5 on DragonFly (13.31 KB, patch)
2006-02-12 02:45 PST, Geert Hendrickx
no flags Details | Diff | Splinter Review

Description Andy Hauser 2004-03-24 11:21:46 PST
User-Agent:       Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040221
Build Identifier: Mozilla/5.0 (X11; U; DragonFly i386; en-US; rv:1.6) Gecko/20040325

compiling on DragonFly BSD with gcc3 does not define __FreeBSD__
therefore the attached patch is needed to get to compile:
--- xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h  Thu Mar 25
18:41:46 2004
+++ xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h  Thu Mar 25
18:44:05 2004
@@ -103,6 +103,9 @@
 #define THUNK_BASED_THIS_ADJUST
 #endif

+#elif defined(__DragonFly__)
+#define THUNK_BASED_THIS_ADJUST
+
 #elif defined(__NetBSD__)
 #define THUNK_BASED_THIS_ADJUST



Reproducible: Always
Steps to Reproduce:
1. export CCVER=gcc3
2. cd /usr/ports/www/mozilla
3. make




--- xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h  Thu Mar 25
18:41:46 2004
+++ xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h  Thu Mar 25
18:44:05 2004
@@ -103,6 +103,9 @@
 #define THUNK_BASED_THIS_ADJUST
 #endif

+#elif defined(__DragonFly__)
+#define THUNK_BASED_THIS_ADJUST
+
 #elif defined(__NetBSD__)
 #define THUNK_BASED_THIS_ADJUST
Comment 1 Rumko 2004-11-15 13:34:09 PST
what about this patch?

--- config/mkdepend/imakemdep.h 2004-11-15 16:12:54.000000000 +0000
@@ -235,7 +235,7 @@
 #ifdef _CRAY
 #define DEFAULT_CPP "/lib/pcpp"
 #endif
-#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) ||
defined(__OpenBSD__)
+#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) ||
defined(__OpenBSD__) || defined(__DragonFly__)
 #define DEFAULT_CPP "/usr/libexec/cpp"
 #endif
 #ifdef MACH
@@ -273,7 +273,7 @@
 #ifdef unix
        "-Uunix",       /* remove unix symbol so that filename unix.c okay */
 #endif
-#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) ||
defined(__OpenBSD__) || defined(MACH)
+#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) ||
defined(__DragonFly__) || defined(__OpenBSD__) || defined(MACH)
 # ifdef __i386__
        "-D__i386__",
 # endif
@@ -716,6 +716,9 @@
 #ifdef __FreeBSD__
        {"__FreeBSD__", "1"},
 #endif
+#ifdef __DragonFly__
+       {"__DragonFly__", "1"},
+#endif
 #ifdef __NetBSD__
        {"__NetBSD__", "1"},
 #endif
--- extensions/transformiix/source/base/Double.cpp      2004-11-15
16:12:54.000000000 +0000
@@ -49,7 +49,7 @@
  */

 //A trick to handle IEEE floating point exceptions on FreeBSD - E.D.
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__DragonFly__)
 #include <ieeefp.h>
 #if defined(__i386__)
 fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP|FP_X_DNML;
--- gc/boehm/gcconfig.h 2000-08-11 00:13:36.000000000 +0000
@@ -188,6 +188,12 @@
 #   define FREEBSD
 #   define mach_type_known
 # endif
+# if defined(__DragonFly__) && defined(i386)
+#   define I386
+#   define DRAGONFLY
+#   define FREEBSD
+#   define mach_type_known
+# endif
 # if defined(__NetBSD__) && defined(i386)
 #   define I386
 #   define NETBSD
@@ -758,6 +764,11 @@
 #      define OS_TYPE "FREEBSD"
 #      define MPROTECT_VDB
 #   endif
+#   ifdef DRAGONFLY
+/* #       define OS_TYPE "DRAGONFLY" */
+#       define OS_TYPE "FREEBSD"
+#       define MPROTECT_VDB
+#   endif
 #   ifdef NETBSD
 #      define OS_TYPE "NETBSD"
 #   endif
@@ -767,7 +778,7 @@
 #   ifdef BSDI
 #      define OS_TYPE "BSDI"
 #   endif
-#   if defined(OPENBSD) || defined(FREEBSD) || defined(NETBSD) \
+#   if defined(OPENBSD) || defined(FREEBSD) || defined(DRAGONFLY) ||
defined(NETBSD) \
         || defined(THREE86BSD) || defined(BSDI)
 #      define HEURISTIC2
        extern char etext;
--- gc/boehm/mach_dep.c 1999-09-30 02:25:45.000000000 +0000
@@ -206,6 +206,7 @@
        && !defined(SCO) && !defined(SCO_ELF) \
        && !(defined(LINUX)       && defined(__ELF__)) \
        && !(defined(__FreeBSD__) && defined(__ELF__)) \
+       && !(defined(__DragonFly__) && defined(__ELF__)) \
        && !defined(DOS4GW)
        /* I386 code, generic code does not appear to work */
        /* It does appear to work under OS2, and asms dont */
@@ -220,7 +221,8 @@
 #       endif

 #      if ( defined(I386) && defined(LINUX) && defined(__ELF__) ) \
-       || ( defined(I386) && defined(__FreeBSD__) && defined(__ELF__) )
+       || ( defined(I386) && defined(__FreeBSD__) && defined(__ELF__) ) \
+       || ( defined(I386) && defined(__DragonFly__) && defined(__ELF__) )

        /* This is modified for Linux with ELF (Note: _ELF_ only) */
        /* This section handles FreeBSD with ELF. */
--- mailnews/movemail/src/movemail.c    2001-09-28 20:07:47.000000000 +0000
@@ -52,7 +52,7 @@
 #define LINUX_GLIBC_2

 #include <sys/errno.h>
-#if !defined(__FreeBSD__) && !defined(MACLINUX) && !defined(LINUX_GLIBC_2)
+#if !defined(__FreeBSD__) && !defined(MACLINUX) && !defined(LINUX_GLIBC_2) &&
!defined(__DragonFly__)
 extern char *sys_errlist[];
 extern int sys_nerr;
 #endif
--- nsprpub/pr/include/gencfg.c 2001-10-26 04:53:58.000000000 +0000
@@ -59,8 +59,8 @@
 #endif

 #if defined(__alpha)
-#if !(defined(_WIN32)) && !(defined(OSF1)) && !(defined(__linux)) &&
!(defined(__FreeBSD__))
-       error - None of OSF1, _WIN32, __linux, or __FreeBSD__ is defined
+#if !(defined(_WIN32)) && !(defined(OSF1)) && !(defined(__linux)) &&
!(defined(__FreeBSD__)) && !(defined(__DragonFly__))
+       error - None of OSF1, _WIN32, __linux, __DragonFly__ or __FreeBSD__ is
defined
 #endif
 #endif

--- nsprpub/pr/include/md/_freebsd.h    2004-11-15 16:12:55.000000000 +0000
@@ -37,7 +37,7 @@

 #include "prthread.h"

-#if __FreeBSD__ >= 2
+#if __FreeBSD__ >= 2 || defined (__DragonFly__)
 #include <osreldate.h>  /* for __FreeBSD_version */
 #endif
 #include <sys/syscall.h>
@@ -76,7 +76,7 @@
 #define _PR_NO_LARGE_FILES

 #if defined(_PR_PTHREADS)
-#if __FreeBSD_version >= 400008
+#if __FreeBSD_version >= 400008 || defined (__DragonFly__)
 /*
  * libc_r before this version of FreeBSD doesn't have poll().
  * Although libc has poll(), it is not thread-safe so we can't
@@ -85,7 +85,7 @@
 #define _PR_POLL_AVAILABLE
 #endif
 #else
-#if __FreeBSD_version >= 300000
+#if __FreeBSD_version >= 300000 || defined (__DragonFly__)
 #define _PR_POLL_AVAILABLE
 #define _PR_USE_POLL
 #endif
@@ -94,7 +94,7 @@
 #define _PR_HAVE_SYSV_SEMAPHORES
 #define PR_HAVE_SYSV_NAMED_SHARED_MEMORY

-#if __FreeBSD_version >= 400014
+#if __FreeBSD_version >= 400014 || defined (__DragonFly__)
 #define _PR_INET6
 #define _PR_HAVE_INET_NTOP
 #define _PR_HAVE_GETHOSTBYNAME2
--- xpcom/build/malloc.c        2003-07-03 20:54:34.000000000 +0000
@@ -918,7 +918,7 @@


 #ifdef LACKS_UNISTD_H
-#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) &&
!defined(__DragonFly__)
 #if __STD_C
 extern Void_t*     sbrk(ptrdiff_t);
 #else
--- xpcom/io/nsLocalFileUnix.h  2004-01-15 06:14:13.000000000 +0000
@@ -57,7 +57,7 @@
 #endif

 // so we can statfs on freebsd
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__DragonFly__)
     #define HAVE_SYS_STATFS_H
     #define STATFS statfs
     #include <sys/param.h>
--- xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h     
2004-01-08 18:17:07.000000000 +0000
@@ -77,7 +77,7 @@
 #define THUNK_BASED_THIS_ADJUST
 #endif

-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
 /* System versions of gcc on FreeBSD don't use thunks.  On 3.x, the system
  * compiler is gcc 2.7.2.3, which doesn't use thunks by default.  On 4.x and
  * 5.x, /usr/src/contrib/gcc/config/freebsd.h explicitly undef's
Comment 2 Gervase Markham [:gerv] 2005-09-27 02:02:43 PDT
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
Comment 3 Gervase Markham [:gerv] 2005-10-13 10:35:55 PDT
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Comment 4 Andy Hauser 2005-10-14 00:20:01 PDT
reopened, please resolve!
Comment 5 Aiko 2005-10-14 06:42:36 PDT
Resolve how? If you want to see this bug fixed, it would be a start to add that
patch as an attachment and ask for review. See the FAQ if you don't know how:
http://www.mozilla.org/hacking/code-review-faq.html
Comment 6 Andy Hauser 2005-10-14 13:28:33 PDT
Created attachment 199593 [details] [diff] [review]
Needed to compile on DragonFly BSD (CCVER=gcc34)

How about just adding those 2 lines to the file? It's a trivial change.
http://ftp.fortunaty.net/DragonFly/inofficial/dfports/patch-xpcom::reflect::xptcall::src::md::unix::xptc_platforms_unixish_x86.h

Is it so difficult ? Do i have to invest serious time ?
Comment 7 Simon 'corecode' Schubert 2005-10-14 13:50:49 PDT
Confirming this issue
Comment 8 Geert Hendrickx 2006-02-12 02:45:23 PST
Created attachment 211577 [details] [diff] [review]
Updated patch for Firefox 1.5 on DragonFly

Here's an updated patch, for Firefox 1.5 on DragonFly (patch-d* from pkgsrc/www/firefox/patches).
Comment 9 Doug Turner (:dougt) 2007-10-08 16:17:19 PDT
mass reassigning to nobody.
Comment 10 Mark Banner (:standard8, afk until Dec) 2008-05-12 14:18:56 PDT
*** Bug 326884 has been marked as a duplicate of this bug. ***
Comment 11 Hasso Tepper 2008-07-08 12:11:01 PDT
I'd like to know why is this basically ignored about four years. What's the problem? I volunteer to update patches to latest versions, but only if someone will care.
Comment 12 Matthias Versen [:Matti] 2009-02-16 13:50:44 PST
Hasso:
If you are still interested you must request a review from soneone.
With review it can be pushed into hg.mozilla.org.
Comment 13 Hasso Tepper 2009-06-29 02:56:34 PDT
Someone? Who? How?
Comment 14 Matthias Versen [:Matti] 2009-06-29 13:23:46 PDT
trying benjamin@smedbergs.us
Comment 15 Benjamin Smedberg [:bsmedberg] 2009-06-29 13:41:03 PDT
Comment on attachment 211577 [details] [diff] [review]
Updated patch for Firefox 1.5 on DragonFly

The patch here covers several different projects. Please split the patch into the following pieces:

1) NSPR (nsprpub)
2) NSS (dbm/ security/coreconf security/nss)
3) mozilla-central
4) LDAP C SDK (directory/c-sdk)

After you attach these I can help you find the appropriate reviewer for each. Also please note that this patch is out of date since code like gc/boehm has not been part of our codebase for a year at least.

Note You need to log in before you can comment on or make changes to this bug.