Thread overview
[Bug 296] Compile Error on FreeBSD PowerPC64
Jul 05, 2018
Curtis
Jul 05, 2018
Iain Buclaw
Jul 06, 2018
Curtis
Jul 06, 2018
Iain Buclaw
Jul 08, 2018
Curtis
Aug 28, 2018
Iain Buclaw
Aug 28, 2018
Iain Buclaw
July 05, 2018
https://bugzilla.gdcproject.org/show_bug.cgi?id=296

Curtis <clhamilto@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|All                         |FreeBSD
           Hardware|All                         |PPC

-- 
You are receiving this mail because:
You are watching all bug changes.
July 05, 2018
https://bugzilla.gdcproject.org/show_bug.cgi?id=296

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #1 from Iain Buclaw <ibuclaw@gdcproject.org> ---
Hmm, looks like the v7 patches are missing a piece.

This is what's in master: https://github.com/D-Programming-GDC/GDC/blob/869276b573228f13c15e467a858d37a72c40618d/gcc/d/patches/patch-targetdm-9.patch#L311-L329


However in the version 7 branch: https://github.com/D-Programming-GDC/GDC/blob/9328415ccf6656d91b00f3e77a5a7d2244567f25/gcc/d/patches/patch-targetdm-7.patch#L310-L320


Can you apply the missing patch and see if that works for you?

-- 
You are receiving this mail because:
You are watching all bug changes.
July 06, 2018
https://bugzilla.gdcproject.org/show_bug.cgi?id=296

--- Comment #2 from Curtis <clhamilto@gmail.com> ---
I'm sure you know that the patches above are against different gcc code bases. It is difficult to determine if anything is missing, because the code is so different.  At any rate I applied the patch in master with code rejects for "powerpcspe" which are not in the gcc 7 code base. I got the error:

".. fatal error: tm_d.h: No such file or directory"

I also took a look at the v7 patches and there's a patch "patch-targetdm-untested-7.patch", that I gave a try, which presented different errors.

Regards

-- 
You are receiving this mail because:
You are watching all bug changes.
July 06, 2018
https://bugzilla.gdcproject.org/show_bug.cgi?id=296

--- Comment #3 from Iain Buclaw <ibuclaw@gdcproject.org> ---
(In reply to Curtis from comment #2)
> I'm sure you know that the patches above are against different gcc code bases.  It is difficult to determine if anything is missing, because the code is so different.  At any rate I applied the patch in master with code rejects for "powerpcspe" which are not in the gcc 7 code base. I got the error:
> 
> ".. fatal error: tm_d.h: No such file or directory"
> 

Indeed, I just spotted that there is nothing in the v7 patch that looks like this:

    d_target_objs="rs6000-d.o"

If I recall right, that's because the powerpc configure path adds rs6000-d.o using this assignment:

    d_target_objs="${d_target_objs} ${cpu_type}-d.o"

Which is too absent from the v7 patches.  So ig you look at that particular hunk, what you are searching for in the config.gcc file is the following line:

    cxx_target_objs="${cxx_target_objs} ${cpu_type}-c.o"

You want to add the d_target_objs assignment *after* that.


> I also took a look at the v7 patches and there's a patch "patch-targetdm-untested-7.patch", that I gave a try, which presented different errors.
> 

The untested patch series just adds architectures not covered by CI, there's nothing powerpc related there.  We already have powerpc64le builds tested, so I know that everything more or less is fine on master.  The problem is that that specific the change did not make it to other branches it seems.

-- 
You are receiving this mail because:
You are watching all bug changes.
July 08, 2018
https://bugzilla.gdcproject.org/show_bug.cgi?id=296

--- Comment #4 from Curtis <clhamilto@gmail.com> ---
Thanks for the tip.  I made the below changes to the patch to get things to work.

@@ -3089,6 +3089,7 @@
 if [ "$target_has_targetcm" = "no" ]; then
   c_target_objs="$c_target_objs default-c.o"
   cxx_target_objs="$cxx_target_objs default-c.o"
+  d_target_objs="$d_target_objs default-d.o"
 fi

 if [ "$common_out_file" = "" ]; then
@@ -4586,6 +4587,7 @@
                out_file=rs6000/rs6000.c
                c_target_objs="${c_target_objs} rs6000-c.o"
                cxx_target_objs="${cxx_target_objs} rs6000-c.o"
+               d_target_objs="${d_target_objs} rs6000-d.o"
                tmake_file="rs6000/t-rs6000 ${tmake_file}"
                ;;


However, the library sources no longer compile like they did under GCC/GDC 5. Correct me if I'm wrong. But it seems these sources are based on DMD2, as the earlier code was LDC based.

-- 
You are receiving this mail because:
You are watching all bug changes.
August 28, 2018
https://bugzilla.gdcproject.org/show_bug.cgi?id=296

--- Comment #5 from Iain Buclaw <ibuclaw@gdcproject.org> ---
(In reply to Curtis from comment #4)
> Thanks for the tip.  I made the below changes to the patch to get things to work.
> 
> @@ -3089,6 +3089,7 @@
>  if [ "$target_has_targetcm" = "no" ]; then
>    c_target_objs="$c_target_objs default-c.o"
>    cxx_target_objs="$cxx_target_objs default-c.o"
> +  d_target_objs="$d_target_objs default-d.o"
>  fi
> 
>  if [ "$common_out_file" = "" ]; then
> @@ -4586,6 +4587,7 @@
>  		out_file=rs6000/rs6000.c
>  		c_target_objs="${c_target_objs} rs6000-c.o"
>  		cxx_target_objs="${cxx_target_objs} rs6000-c.o"
> +		d_target_objs="${d_target_objs} rs6000-d.o"
>  		tmake_file="rs6000/t-rs6000 ${tmake_file}"
>  		;;
> 
> 
> However, the library sources no longer compile like they did under GCC/GDC 5. Correct me if I'm wrong. But it seems these sources are based on DMD2, as the earlier code was LDC based.

They've only ever been merged from dlang/druntime.

Someone else got in touch, and I think what you are referring to is the lack of any defined platform versions, this is expected, as FreeBSD is an untested port.

There needs to be a new target source created, and fill in the appropriate target hooks.

-- 
You are receiving this mail because:
You are watching all bug changes.
August 28, 2018
https://bugzilla.gdcproject.org/show_bug.cgi?id=296

--- Comment #6 from Iain Buclaw <ibuclaw@gdcproject.org> ---
First part is dealt with here.

https://github.com/D-Programming-GDC/GDC/pull/726

-- 
You are receiving this mail because:
You are watching all bug changes.